Author: russellm Date: 2010-08-05 08:19:54 -0500 (Thu, 05 Aug 2010) New Revision: 13490
Modified: django/branches/releases/1.2.X/AUTHORS django/branches/releases/1.2.X/django/core/management/__init__.py django/branches/releases/1.2.X/django/db/__init__.py Log: [1.2.X] Fixed #13610 -- Improved error reporting when the ENGINE setting is ommitted from a database configuration. Thanks to Gregor M?\195?\188llegger for the report and patch. Backport of r13489 from trunk. Modified: django/branches/releases/1.2.X/AUTHORS =================================================================== --- django/branches/releases/1.2.X/AUTHORS 2010-08-05 13:18:50 UTC (rev 13489) +++ django/branches/releases/1.2.X/AUTHORS 2010-08-05 13:19:54 UTC (rev 13490) @@ -336,6 +336,7 @@ Aljosa Mohorovic <aljosa.mohoro...@gmail.com> Ramiro Morales <r...@gmx.net> Eric Moritz <http://eric.themoritzfamily.com/> + Gregor Müllegger <gre...@muellegger.de> Robin Munn <http://www.geekforgod.com/> James Murty msundstr Modified: django/branches/releases/1.2.X/django/core/management/__init__.py =================================================================== --- django/branches/releases/1.2.X/django/core/management/__init__.py 2010-08-05 13:18:50 UTC (rev 13489) +++ django/branches/releases/1.2.X/django/core/management/__init__.py 2010-08-05 13:19:54 UTC (rev 13490) @@ -250,15 +250,15 @@ """ try: app_name = get_commands()[subcommand] - if isinstance(app_name, BaseCommand): - # If the command is already loaded, use it directly. - klass = app_name - else: - klass = load_command_class(app_name, subcommand) except KeyError: sys.stderr.write("Unknown command: %r\nType '%s help' for usage.\n" % \ (subcommand, self.prog_name)) sys.exit(1) + if isinstance(app_name, BaseCommand): + # If the command is already loaded, use it directly. + klass = app_name + else: + klass = load_command_class(app_name, subcommand) return klass def autocomplete(self): Modified: django/branches/releases/1.2.X/django/db/__init__.py =================================================================== --- django/branches/releases/1.2.X/django/db/__init__.py 2010-08-05 13:18:50 UTC (rev 13489) +++ django/branches/releases/1.2.X/django/db/__init__.py 2010-08-05 13:19:54 UTC (rev 13490) @@ -35,6 +35,8 @@ raise ImproperlyConfigured("You must default a '%s' database" % DEFAULT_DB_ALIAS) for alias, database in settings.DATABASES.items(): + if 'ENGINE' not in database: + raise ImproperlyConfigured("You must specify a 'ENGINE' for database '%s'" % alias) if database['ENGINE'] in ("postgresql", "postgresql_psycopg2", "sqlite3", "mysql", "oracle"): import warnings if 'django.contrib.gis' in settings.INSTALLED_APPS: -- You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-upda...@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.