Ticket #13610: 13610.patch

File 13610.patch, 1.6 KB (added by Gregor Müllegger, 14 years ago)
  • django/core/management/__init__.py

    === modified file 'django/core/management/__init__.py'
     
    250250        """
    251251        try:
    252252            app_name = get_commands()[subcommand]
    253             if isinstance(app_name, BaseCommand):
    254                 # If the command is already loaded, use it directly.
    255                 klass = app_name
    256             else:
    257                 klass = load_command_class(app_name, subcommand)
    258253        except KeyError:
    259254            sys.stderr.write("Unknown command: %r\nType '%s help' for usage.\n" % \
    260255                (subcommand, self.prog_name))
    261256            sys.exit(1)
     257        if isinstance(app_name, BaseCommand):
     258            # If the command is already loaded, use it directly.
     259            klass = app_name
     260        else:
     261            klass = load_command_class(app_name, subcommand)
    262262        return klass
    263263
    264264    def autocomplete(self):
  • django/db/__init__.py

    === modified file 'django/db/__init__.py'
     
    3535    raise ImproperlyConfigured("You must default a '%s' database" % DEFAULT_DB_ALIAS)
    3636
    3737for alias, database in settings.DATABASES.items():
     38    if 'ENGINE' not in database:
     39        raise ImproperlyConfigured("You must specify a 'ENGINE' in '%s' database setting" % alias)
    3840    if database['ENGINE'] in ("postgresql", "postgresql_psycopg2", "sqlite3", "mysql", "oracle"):
    3941        import warnings
    4042        if 'django.contrib.gis' in settings.INSTALLED_APPS:
Back to Top