Ticket #1371: 1371.diff

File 1371.diff, 977 bytes (added by django@…, 16 years ago)

Updated version of old patch

  • django/conf/__init__.py

     
    110110                new_installed_apps.append(app)
    111111        self.INSTALLED_APPS = new_installed_apps
    112112
     113        # Install default values from apps, listed in a module named default_settings.
     114        for app in self.INSTALLED_APPS:
     115            try:
     116                dapp = __import__("%s.default_settings" %app, '', '', [''])
     117                for setting in dir(dapp):
     118                    if setting == setting.upper() and not hasattr(self, setting):
     119                        setattr(self, setting, getattr(dapp, setting))
     120            except ImportError:
     121                pass
     122
    113123        if hasattr(time, 'tzset'):
    114124            # Move the time zone info into os.environ. See ticket #2315 for why
    115125            # we don't do this unconditionally (breaks Windows).
Back to Top