From a22f823e0034bf607b841bd704cfd4d2cc6621a1 Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Sat, 16 Jul 2005 22:58:29 +0000 Subject: [PATCH] More installation streamlining: Added default urlconfs, for both main and admin, to project_template. Changed ROOT_URLCONF in default main and admin settings to point at their respective default urlconfs git-svn-id: http://code.djangoproject.com/svn/django/trunk@124 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/conf/project_template/settings/admin.py | 2 +- django/conf/project_template/settings/main.py | 2 ++ django/conf/project_template/settings/urls/__init__.py | 0 django/conf/project_template/settings/urls/admin.py | 5 +++++ django/conf/project_template/settings/urls/main.py | 6 ++++++ 5 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 django/conf/project_template/settings/urls/__init__.py create mode 100644 django/conf/project_template/settings/urls/admin.py create mode 100644 django/conf/project_template/settings/urls/main.py diff --git a/django/conf/project_template/settings/admin.py b/django/conf/project_template/settings/admin.py index 405a5ebad8..9473052cad 100644 --- a/django/conf/project_template/settings/admin.py +++ b/django/conf/project_template/settings/admin.py @@ -5,7 +5,7 @@ from main import * TEMPLATE_DIRS = ( # Put strings here, like "/home/html/django_templates". ) -ROOT_URLCONF = 'django.conf.urls.admin' +ROOT_URLCONF = '{{ project_name }}.settings.urls.admin' MIDDLEWARE_CLASSES = ( 'django.middleware.admin.AdminUserRequired', 'django.middleware.common.CommonMiddleware', diff --git a/django/conf/project_template/settings/main.py b/django/conf/project_template/settings/main.py index b59ff74059..db57be686d 100644 --- a/django/conf/project_template/settings/main.py +++ b/django/conf/project_template/settings/main.py @@ -26,6 +26,8 @@ MEDIA_ROOT = '' # Example: "http://media.lawrence.com" MEDIA_URL = '' +ROOT_URLCONF = '{{ project_name }}.settings.urls.main' + TEMPLATE_DIRS = ( # Put strings here, like "/home/html/django_templates". ) diff --git a/django/conf/project_template/settings/urls/__init__.py b/django/conf/project_template/settings/urls/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/django/conf/project_template/settings/urls/admin.py b/django/conf/project_template/settings/urls/admin.py new file mode 100644 index 0000000000..31b241a8af --- /dev/null +++ b/django/conf/project_template/settings/urls/admin.py @@ -0,0 +1,5 @@ +from django.conf.urls.defaults import * + +urlpatterns = patterns('', + (r'^admin/', include('django.conf.urls.admin')), +) diff --git a/django/conf/project_template/settings/urls/main.py b/django/conf/project_template/settings/urls/main.py new file mode 100644 index 0000000000..f9b993a52c --- /dev/null +++ b/django/conf/project_template/settings/urls/main.py @@ -0,0 +1,6 @@ +from django.conf.urls.defaults import * + +urlpatterns = patterns('', + # Example: + # (r'^{{ project_name }}/', include('{{ project_name }}.apps.foo.urls.foo')), +)