diff options
| author | Marten Kenbeek <marten.knbk@gmail.com> | 2015-12-30 17:13:58 +0100 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2015-12-31 08:21:24 -0500 |
| commit | b37cb0b95878c9356693f129334778f00f44a1bc (patch) | |
| tree | 36a18dd895d9bebc42c9e52fb90537f559520b04 /docs | |
| parent | 406acd66e349238e5e8d2cd15473019e82c0cadb (diff) | |
[1.9.x] Refs #21927 -- Added note about include() to tutorial.
Backport of 6687f4dcbbfeca81b76233609fca90f30ce4dd25 from master
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/intro/tutorial01.txt | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/docs/intro/tutorial01.txt b/docs/intro/tutorial01.txt index 7255f2b3ee..0bdc593ec9 100644 --- a/docs/intro/tutorial01.txt +++ b/docs/intro/tutorial01.txt @@ -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 |
