Ticket #2491: fix_project_directory_not_defined.diff
File fix_project_directory_not_defined.diff, 1008 bytes (added by , 18 years ago) |
---|
-
django/core/management.py
1295 1295 """ 1296 1296 Configure the runtime environment. This can also be used by external 1297 1297 scripts wanting to set up a similar environment to manage.py. 1298 1299 Return the project directory. 1298 1300 """ 1299 1301 # Add this project to sys.path so that it's importable in the conventional 1300 1302 # way. For example, if this file (manage.py) lives in a directory … … 1307 1309 1308 1310 # Set DJANGO_SETTINGS_MODULE appropriately. 1309 1311 os.environ['DJANGO_SETTINGS_MODULE'] = '%s.settings' % project_name 1312 return project_directory 1310 1313 1311 1314 def execute_manager(settings_mod, argv=None): 1312 setup_environ(settings_mod)1315 project_directory = setup_environ(settings_mod) 1313 1316 action_mapping = DEFAULT_ACTION_MAPPING.copy() 1314 1317 1315 1318 # Remove the "startproject" command from the action_mapping, because that's