mirror of
https://github.com/django/django.git
synced 2025-09-14 14:35:27 +00:00
Fixed #25525 -- Added instructions about importing include() in urls.py
This commit is contained in:
parent
ca43ee9d0f
commit
7ce6b10e94
1 changed files with 2 additions and 1 deletions
|
@ -11,7 +11,8 @@ Class-based views
|
||||||
2. Add a URL to urlpatterns: url(r'^$', Home.as_view(), name='home')
|
2. Add a URL to urlpatterns: url(r'^$', Home.as_view(), name='home')
|
||||||
Including another URLconf
|
Including another URLconf
|
||||||
1. Add an import: from blog import urls as blog_urls
|
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.conf.urls import url
|
||||||
from django.contrib import admin
|
from django.contrib import admin
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue