Skip to content

Commit

Permalink
Explained exception to using include() within urlpatterns in tutorial 1.
Browse files Browse the repository at this point in the history
  • Loading branch information
samurang87 authored Oct 9, 2024
1 parent d4e4520 commit 40a60d5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/intro/tutorial01.txt
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,8 @@ app will still work.
.. admonition:: When to use :func:`~django.urls.include()`

You should always use ``include()`` when you include other URL patterns.
``admin.site.urls`` is the only exception to this.
The only exception is ``admin.site.urls``, which is a pre-built URLconf
provided by Django for the default admin site.

You have now wired an ``index`` view into the URLconf. Verify it's working with
the following command:
Expand Down

0 comments on commit 40a60d5

Please sign in to comment.