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, **kwargs)#
Simple view function for pages. Get the page by its slug, find the right renderer for it and return a HTTP response with the rendered page.
- Parameters:
request (
HttpRequest) – HTTP requestslug (str) – slug of the page to be rendered
kwargs – Additional data as keyword arguments (default empty dict)
- Returns:
HTTP response with the rendered page
- Return type:
- Raises:
Http404 – if no page with the given slug exists