summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2015-12-09 11:27:16 -0500
committerTim Graham <timograham@gmail.com>2015-12-09 11:47:26 -0500
commit4211f8c9d1cd543d9c6fe4b789aea7dddf07c44a (patch)
tree6fc41b300dcce6a08d587800509c325c13cd07a4
parent0772bffd4a2feac3928924a8427f372ab3ec6919 (diff)
[1.8.x] Fixed #25711 -- Updated the project template's include() example.
Referencing URLs by dotted path is a stronger convention than importing the URLs. Backport of 179fbab7e05946b59ec9815d6e9b1901826ed610 from master
-rw-r--r--django/conf/project_template/project_name/urls.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/django/conf/project_template/project_name/urls.py b/django/conf/project_template/project_name/urls.py
index 665085b17b..cbc982dffc 100644
--- a/django/conf/project_template/project_name/urls.py
+++ b/django/conf/project_template/project_name/urls.py
@@ -10,8 +10,7 @@ Class-based views
1. Add an import: from other_app.views import Home
2. Add a URL to urlpatterns: url(r'^$', Home.as_view(), name='home')
Including another URLconf
- 1. Add an import: from blog import urls as blog_urls
- 2. Add a URL to urlpatterns: url(r'^blog/', include(blog_urls))
+ 1. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls'))
"""
from django.conf.urls import include, url
from django.contrib import admin