November 2015
Beginner to intermediate
840 pages
26h 30m
English
We’ve created the four display webpages in our organizer app. We will now build two pages in our blog app. To maintain app encapsulation, we must first create an app-specific URL configuration file and then point a URL pattern in the site-wide URL configuration to it.
Start by creating /blog/urls.py and coding the very basic requirements for a URL configuration. This will yield the code shown in Example 5.47.
Example 5.47: Project Code
1 urlpatterns = [ 2 ]
In /suorganizer/urls.py we can direct Django to our blog app URL configuration thanks to include(), as shown in Example 5.48.
Example 5.48: Project Code
Read now
Unlock full access