summaryrefslogtreecommitdiff
path: root/django/conf/project_template
diff options
context:
space:
mode:
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__.py0
-rw-r--r--django/conf/project_template/settings/admin.py18
-rw-r--r--django/conf/project_template/settings/urls/__init__.py0
-rw-r--r--django/conf/project_template/settings/urls/admin.py6
-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')),
)