includeto Create a Hierarchy of URL Configurations
The second argument passed to
url() need not point at a view: it can point at another URL configuration, thanks to the
include() function. This capability allows us to create a separate URL configuration in each Django app and have a URL pattern in the site-wide URL configuration point to each one. In effect, the full URL configuration is not a simple list but is actually a tree, where the leaves of the tree are webpages (see Figure 5.6).
When a URL pattern points to a URL configuration, the regular expression pattern acts as a URI prefix. For ...