From b852989c3073f6748412aac68cbd080c13d0e397 Mon Sep 17 00:00:00 2001 From: Chiara Mezzavilla <2512470+samurang87@users.noreply.github.com> Date: Wed, 9 Oct 2024 16:46:26 +0200 Subject: [PATCH] [5.1.x] Explained exception to using include() within urlpatterns in tutorial 1. Backport of 40a60d589e1d0d290c3b79c7e97d9cd0c94e52e3 from main. --- docs/intro/tutorial01.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/intro/tutorial01.txt b/docs/intro/tutorial01.txt index 59dc02df77..b840eb2660 100644 --- a/docs/intro/tutorial01.txt +++ b/docs/intro/tutorial01.txt @@ -290,7 +290,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: