Ticket #5943: 5943-django-admin-8295.diff
File 5943-django-admin-8295.diff, 974 bytes (added by , 16 years ago) |
---|
-
django/core/management/__init__.py
104 104 # Find the project directory 105 105 try: 106 106 from django.conf import settings 107 project_directory = setup_environ(__import__(settings.SETTINGS_MODULE)) 107 settings_mod = __import__(settings.SETTINGS_MODULE, {}, {}, 108 [settings.SETTINGS_MODULE.split('.')[-1]]) 109 project_directory = setup_environ(settings_mod) 108 110 except (AttributeError, EnvironmentError, ImportError): 109 111 project_directory = None 110 112 … … 310 312 311 313 # Set DJANGO_SETTINGS_MODULE appropriately. 312 314 os.environ['DJANGO_SETTINGS_MODULE'] = '%s.%s' % (project_name, settings_name) 315 return project_directory 313 316 314 317 def execute_from_command_line(argv=None): 315 318 """