diff options
| author | Carl Meyer <carl@oddbird.net> | 2011-10-13 05:56:15 +0000 |
|---|---|---|
| committer | Carl Meyer <carl@oddbird.net> | 2011-10-13 05:56:15 +0000 |
| commit | 38f1fe3b35c212136d959538a309c33bf2d340a9 (patch) | |
| tree | e3ef8f67f85be6c9217bd6fca5985e7342c5e421 /django/conf/project_template | |
| parent | f04af7080b12744c8f06fb8228ef683d556690d0 (diff) | |
Fixed #15372 -- Switched to a startproject default layout that allows us to avoid sys.path hacks.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16964 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/conf/project_template')
| -rwxr-xr-x | django/conf/project_template/manage.py | 17 | ||||
| -rw-r--r-- | django/conf/project_template/project_name/__init__.py (renamed from django/conf/project_template/__init__.py) | 0 | ||||
| -rw-r--r-- | django/conf/project_template/project_name/settings.py (renamed from django/conf/project_template/settings.py) | 0 | ||||
| -rw-r--r-- | django/conf/project_template/project_name/urls.py (renamed from django/conf/project_template/urls.py) | 0 |
4 files changed, 6 insertions, 11 deletions
diff --git a/django/conf/project_template/manage.py b/django/conf/project_template/manage.py index 3e4eedc9ff..2568a324b1 100755 --- a/django/conf/project_template/manage.py +++ b/django/conf/project_template/manage.py @@ -1,14 +1,9 @@ #!/usr/bin/env python -from django.core.management import execute_manager -import imp -try: - imp.find_module('settings') # Assumed to be in the same directory. -except ImportError: - import sys - sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to run django-admin.py, passing it your settings module.\n" % __file__) - sys.exit(1) - -import settings +import os, sys if __name__ == "__main__": - execute_manager(settings) + os.environ.setdefault("DJANGO_SETTINGS_MODULE", "{{ project_name }}.settings") + + from django.core.management import execute_from_command_line + + execute_from_command_line(sys.argv) diff --git a/django/conf/project_template/__init__.py b/django/conf/project_template/project_name/__init__.py index e69de29bb2..e69de29bb2 100644 --- a/django/conf/project_template/__init__.py +++ b/django/conf/project_template/project_name/__init__.py diff --git a/django/conf/project_template/settings.py b/django/conf/project_template/project_name/settings.py index b92c1163c3..b92c1163c3 100644 --- a/django/conf/project_template/settings.py +++ b/django/conf/project_template/project_name/settings.py diff --git a/django/conf/project_template/urls.py b/django/conf/project_template/project_name/urls.py index eb471d54a8..eb471d54a8 100644 --- a/django/conf/project_template/urls.py +++ b/django/conf/project_template/project_name/urls.py |
