Ticket #21737: 21737-1.diff

File 21737-1.diff, 793 bytes (added by Claude Paroz, 11 years ago)

Possible fix

  • django/core/management/__init__.py

    diff --git a/django/core/management/__init__.py b/django/core/management/__init__.py
    index 34597bf..578f94e 100644
    a b class ManagementUtility(object):  
    388388        try:
    389389            django.setup()
    390390        except ImproperlyConfigured:
    391             # Some commands are supposed to work without configured settings
    392             pass
     391            # Check if ImproperlyConfigured is due to settings
     392            try:
     393                settings.INSTALLED_APPS
     394            except ImproperlyConfigured:
     395                # Some commands are supposed to work without configured settings
     396                pass
     397            else:
     398                raise
    393399
    394400        try:
    395401            subcommand = self.argv[1]
Back to Top