Ticket #7187: apache_import.patch

File apache_import.patch, 893 bytes (added by Andrei <andrei@…>, 17 years ago)
  • django/conf/__init__.py

     
    8484        try:
    8585            mod = __import__(self.SETTINGS_MODULE, {}, {}, [''])
    8686        except ImportError, e:
    87             raise ImportError, "Could not import settings '%s' (Is it on sys.path? Does it have syntax errors?): %s" % (self.SETTINGS_MODULE, e)
     87            try:
     88                from mod_python import apache
     89                mod = apache.import_module(self.SETTINGS_MODULE)
     90            except ImportError, e:
     91                raise ImportError, "Could not import settings '%s' (Is it on sys.path? Does it have syntax errors?): %s " % (self.SETTINGS_MODULE, e)
    8892
    8993        # Settings that should be converted into tuples if they're mistakenly entered
    9094        # as strings.
Back to Top