def syncdb(settings, args): """ Run syncdb to create or update the database. """ ensure_settings(settings, args) db_file = get_database_path_from_settings() if db_file is not None: db_dir = os.path.dirname(db_file) if not os.path.exists(db_dir): os.makedirs(db_dir) if not os.path.exists(db_file): print('Clearing old search index...') execute_from_command_line(["", "clear_index", "--noinput"]) execute_from_command_line(["", "syncdb", "--noinput"]) if args.language: translate_customizable_strings(args.language) return 0
def test_translate_customizable_strings(self): self.assertEqual(config['event_description'], 'Presentation and assembly system') translate_customizable_strings('de') self.assertEqual(config['event_description'], u'Präsentations- und Versammlungssystem')