August 2016
Beginner to intermediate
717 pages
15h 24m
English
Once you have an app hooked in the CMS pages, all the URL paths under the page node will be controlled by the urls.py file of the app. To add some menu items under this page, you need to add a dynamical branch of navigation to the page tree. In this recipe, we will improve the movies app and add new navigation items under the Movies page.
Let's say that we have a URL configuration for different lists of movies: editor's picks, commercial movies, and independent movies, as shown in the following code:
# movies/urls.py # -*- coding: UTF-8 -*- from __future__ import unicode_literals from django.conf.urls import url, patterns from django.shortcuts import redirect urlpatterns = patterns("movies.views", url(r"^$", ...Read now
Unlock full access