Utils#
Overview#
Django Simple Page provides some utilities to make your life easier. These are
some template tags - mainly the menu tag
to render a navigation menu for your pages. And a
page view function you could use in your url
configuration. You are free to use them or not.
Api Reference#
Page view#
- simple_page.views.page_view(request, slug=None, **kwargs)#
Simple view function for pages. Get the page, find the right renderer for it and return a HTTP response with the rendered page. The page is either choosen by its slug or if no slug is given the root page is used.
- Parameters:
request (
HttpRequest) – HTTP requestslug (str) – slug of the page to be rendered
kwargs (dict) – Additional data as keyword arguments
- Returns:
HTTP response with the rendered page
- Return type:
- Raises:
Http404 – if no page could be found