diff options
| author | Baptiste Mispelon <bmispelon@gmail.com> | 2015-10-07 17:01:19 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2015-10-07 17:10:34 -0400 |
| commit | 8a9872543ca4f8d017c2ccccd49d9a202dd3d390 (patch) | |
| tree | 38080660351ea86036587c78a290d96c28ad4dc2 | |
| parent | c894f215e243d9526ccc116b3ce5ec7bce3b4055 (diff) | |
[1.9.x] Fixed #25525 -- Added instructions about importing include() in urls.py
Backport of 7ce6b10e9464995a038289e00169ffa85d29e3a5 from master
| -rw-r--r-- | django/conf/project_template/project_name/urls.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/django/conf/project_template/project_name/urls.py b/django/conf/project_template/project_name/urls.py index c0cfc4e2a3..0fc13c9620 100644 --- a/django/conf/project_template/project_name/urls.py +++ b/django/conf/project_template/project_name/urls.py @@ -11,7 +11,8 @@ Class-based views 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)) + 2. Import the include() function: from django.conf.urls import url, include + 3. Add a URL to urlpatterns: url(r'^blog/', include(blog_urls)) """ from django.conf.urls import url from django.contrib import admin |
