1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Fixed #9005: don't wig out when reversing a URL if SETTINGS_MODULE isn't set. While I was there, I fixed #10599 by re-raising the original error message, which is almost always a better idea. Thanks, Eric

git-svn-id: http://code.djangoproject.com/svn/django/trunk@10350 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Jacob Kaplan-Moss
2009-04-01 22:46:46 +00:00
parent dc832d7753
commit 624caace17
3 changed files with 29 additions and 7 deletions

View File

@@ -323,7 +323,7 @@ def setup_environ(settings_mod, original_settings_path=None):
else:
os.environ['DJANGO_SETTINGS_MODULE'] = '%s.%s' % (project_name, settings_name)
# Import the project module. We add the parent directory to PYTHONPATH to
# Import the project module. We add the parent directory to PYTHONPATH to
# avoid some of the path errors new users can have.
sys.path.append(os.path.join(project_directory, os.pardir))
project_module = import_module(project_name)