diff options
| author | Adrian Holovaty <adrian@holovaty.com> | 2005-10-19 01:09:05 +0000 |
|---|---|---|
| committer | Adrian Holovaty <adrian@holovaty.com> | 2005-10-19 01:09:05 +0000 |
| commit | f07e5d4f5df5ca9ca3366d7ecc4b01c490c13198 (patch) | |
| tree | 1b73d89471554d058cb46bc13d17bd3687c638fa /django/conf/project_template | |
| parent | fd3d579179581b1fa460e13115471d58fec0c8f6 (diff) | |
Fixed #627 -- BACKWARDS-INCOMPATIBLE CHANGE. Admin is now an app, not a middleware. See BackwardsIncompatibleChanges for a full list of changes and information on how to update your code.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@948 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/conf/project_template')
| -rw-r--r-- | django/conf/project_template/settings.py (renamed from django/conf/project_template/settings/main.py) | 10 | ||||
| -rw-r--r-- | django/conf/project_template/settings/__init__.py | 0 | ||||
| -rw-r--r-- | django/conf/project_template/settings/admin.py | 18 | ||||
| -rw-r--r-- | django/conf/project_template/settings/urls/__init__.py | 0 | ||||
| -rw-r--r-- | django/conf/project_template/settings/urls/admin.py | 6 | ||||
| -rw-r--r-- | django/conf/project_template/urls.py (renamed from django/conf/project_template/settings/urls/main.py) | 3 |
6 files changed, 11 insertions, 26 deletions
diff --git a/django/conf/project_template/settings/main.py b/django/conf/project_template/settings.py index 1bde7df10a..838375cbb7 100644 --- a/django/conf/project_template/settings/main.py +++ b/django/conf/project_template/settings.py @@ -27,22 +27,28 @@ MEDIA_ROOT = '' # Example: "http://media.lawrence.com" MEDIA_URL = '' +# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a +# trailing slash. +# Examples: "http://foo.com/media/", "/media/". +ADMIN_MEDIA_PREFIX = '/media/' + # Make this unique, and don't share it with anybody. SECRET_KEY = '' # List of callables that know how to import templates from various sources. TEMPLATE_LOADERS = ( -# 'django.core.template.loaders.app_directories.load_template_source', 'django.core.template.loaders.filesystem.load_template_source', + 'django.core.template.loaders.app_directories.load_template_source', # 'django.core.template.loaders.eggs.load_template_source', ) MIDDLEWARE_CLASSES = ( "django.middleware.common.CommonMiddleware", + "django.middleware.sessions.SessionMiddleware", "django.middleware.doc.XViewMiddleware", ) -ROOT_URLCONF = '{{ project_name }}.settings.urls.main' +ROOT_URLCONF = '{{ project_name }}.urls' TEMPLATE_DIRS = ( # Put strings here, like "/home/html/django_templates". diff --git a/django/conf/project_template/settings/__init__.py b/django/conf/project_template/settings/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 --- a/django/conf/project_template/settings/__init__.py +++ /dev/null diff --git a/django/conf/project_template/settings/admin.py b/django/conf/project_template/settings/admin.py deleted file mode 100644 index 603886a5f2..0000000000 --- a/django/conf/project_template/settings/admin.py +++ /dev/null @@ -1,18 +0,0 @@ -# Django settings for {{ project_name }} project admin site. - -from main import * - -TEMPLATE_DIRS = ( - # Put strings here, like "/home/html/django_templates". -) -ROOT_URLCONF = '{{ project_name }}.settings.urls.admin' -MIDDLEWARE_CLASSES = ( - 'django.middleware.sessions.SessionMiddleware', - 'django.middleware.admin.AdminUserRequired', - 'django.middleware.common.CommonMiddleware', -) - -# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a -# trailing slash. -# Examples: "http://foo.com/media/", "/media/". -ADMIN_MEDIA_PREFIX = '/media/' diff --git a/django/conf/project_template/settings/urls/__init__.py b/django/conf/project_template/settings/urls/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 --- a/django/conf/project_template/settings/urls/__init__.py +++ /dev/null diff --git a/django/conf/project_template/settings/urls/admin.py b/django/conf/project_template/settings/urls/admin.py deleted file mode 100644 index c3eb86d3cb..0000000000 --- a/django/conf/project_template/settings/urls/admin.py +++ /dev/null @@ -1,6 +0,0 @@ -from django.conf.urls.defaults import * - -urlpatterns = patterns('', - (r'^admin/', include('django.conf.urls.admin')), - (r'^r/', include('django.conf.urls.shortcut')), -) diff --git a/django/conf/project_template/settings/urls/main.py b/django/conf/project_template/urls.py index f9b993a52c..fe77ea1867 100644 --- a/django/conf/project_template/settings/urls/main.py +++ b/django/conf/project_template/urls.py @@ -3,4 +3,7 @@ from django.conf.urls.defaults import * urlpatterns = patterns('', # Example: # (r'^{{ project_name }}/', include('{{ project_name }}.apps.foo.urls.foo')), + + # Uncomment this for admin: +# (r'^admin/', include('django.contrib.admin.urls.admin')), ) |
