mirror of
https://github.com/django/django.git
synced 2025-08-09 21:38:18 +00:00
[1.9.x] Refs #21927 -- Added note about include() to tutorial.
Backport of 6687f4dcbb
from master
This commit is contained in:
parent
406acd66e3
commit
b37cb0b958
1 changed files with 5 additions and 0 deletions
|
@ -298,6 +298,11 @@ an :func:`~django.conf.urls.include` in the ``urlpatterns`` list, so you have:
|
|||
url(r'^admin/', admin.site.urls),
|
||||
]
|
||||
|
||||
.. admonition:: When to use :func:`~django.conf.urls.include()`
|
||||
|
||||
You should always use ``include()`` when you include other URL patterns.
|
||||
``admin.site.urls`` is the only exception to this.
|
||||
|
||||
.. admonition:: Doesn't match what you see?
|
||||
|
||||
If you're seeing ``include(admin.site.urls)`` instead of just
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue