November 2015
Beginner to intermediate
840 pages
26h 30m
English
FlatPage Objects via the URL ConfigurationAccording to the Django documentation we can display FlatPage instances by including the flatpages app URL configuration in our own root URL configuration in suorganizer/urls.py, as shown in Example 15.17.
Example 15.17: Project Code
suorganizer/urls.py in 2a02d29ec6
18 from django.contrib.flatpages import \ 19 urls as flatpages_urls . ... 29 urlpatterns = [ . ... 35 url(r'^page', include(flatpages_urls)), . ... 38 ]
If you try to run Django’s development server via ./manage.py runserver, you will be unable to reach the about webpage at /about/. Instead, the page will be displayed at /page/about/.
Warning
If you forget ...
Read now
Unlock full access