예제 #1
0
    def handle(self, *args, **options):
        translation.activate(settings.LANGUAGE_CODE)

        excluded_apps = options.get('excluded_apps', [])
        Importer.import_all(excludes=excluded_apps)

        Migrator.migrate(
            commit=options.get('commit_changes', False),
            log_queries=options.get('logquery', False)
        )
예제 #2
0
    def handle(self, *args, **options):
        translation.activate(settings.LANGUAGE_CODE)

        excluded_apps = options.get('excluded_apps', [])

        sys.stdout.write("Importing migrations ...\n")
        Importer.import_all(excludes=excluded_apps)

        sys.stdout.write("Running migrations ...\n")
        Migrator.migrate(commit=options.get('commit_changes', False),
                         log_queries=options.get('logquery', False))

        sys.stdout.write("Done\n")
    def handle(self, *args, **options):
        translation.activate(settings.LANGUAGE_CODE)

        excluded_apps = options.get('excluded_apps', [])

        sys.stdout.write("Importing migrations ...\n")
        Importer.import_all(excludes=excluded_apps)

        sys.stdout.write("Running migrations ...\n")
        Migrator.migrate(
            commit=options.get('commit_changes', False),
            log_queries=options.get('logquery', False)
        )

        sys.stdout.write("Done\n")