Page(id, active, title, slug, parent_id, in_navigation, override_url, redirect_to, _cached_url)
Check whether all ancestors of this page are active
Return a string that may be used as cache key for the current page. The cache_key is unique for each content type and content instance.
Generate an etag for this page. An etag should be unique and unchanging for as long as the page content does not change. Since we have no means to determine whether rendering the page now (as opposed to a minute ago) will actually give the same result, this default implementation returns None, which means “No etag please, thanks for asking”.
Response processor to set an etag header on outgoing responses. The Page.etag() method must return something valid as etag content whenever you want an etag header generated.
After rendering a page to a response, the registered response processors are called to modify the response, eg. for setting cache or expiration headers, keeping statistics, etc.
Creates a QuerySet containing the ancestors of this model instance.
This defaults to being in descending order (root ancestor first, immediate parent last); passing True for the ascending argument will reverse the ordering (immediate parent first, root ancestor last).
Creates a QuerySet containing the immediate children of this model instance, in tree order.
The benefit of using this method over the reverse relation provided by the ORM to the instance’s children is that a database query can be avoided in the case where the instance is a leaf node (it has no children).
Returns the number of descendants this model instance has.
Creates a QuerySet containing descendants of this model instance, in tree order.
If include_self is True, the QuerySet will also include this model instance.
Creates a QuerySet containing leafnodes of this model instance, in tree order.
If include_self is True, the QuerySet will also include this model instance.
Returns this model instance’s next sibling in the tree, or None if it doesn’t have a next sibling.
Returns this model instance’s previous sibling in the tree, or None if it doesn’t have a previous sibling.
This might be overriden/extended by extension modules.
Returns the root node of this model instance’s tree.
Creates a QuerySet containing siblings of this model instance. Root nodes are considered to be siblings of other root nodes.
If include_self is True, the QuerySet will also include this model instance.
Convenience method for calling TreeManager.insert_node with this model instance.
Check whether this page and all its ancestors are active
Returns True if this model instance is a child node, False otherwise.
Returns True if this model instance is a leaf node (it has no children), False otherwise.
Returns True if this model instance is a root node, False otherwise.
Convenience method for calling TreeManager.move_node with this model instance.
Checks whether any ancestors are actually inaccessible (ie. not inactive or expired) and raise a 404 if so.
Before rendering a page, run all registered request processors. A request processor may peruse and modify the page or the request. It can also return a HttpResponse for shortcutting the page rendering and returning that response immediately to the client.
Title shortened for display.
Return the best match for a path. If the path as given is unavailable, continues to search by chopping path components off the end.
Tries hard to avoid unnecessary database lookups by generating all poss matching url prefixes and choosing the longtest match.
Page.best_match_for_path(‘/photos/album/2008/09’) might return the page with url ‘/photos/album’.
Creates an identical copy of a page except that the new one is inactive.
Return a page for a path.
Example: Page.objects.page_for_path(request.path)
Wrapper for page_for_path which raises a Http404 if no page has been found for the passed path.
alias of PageAdminForm
Instead of just showing an on/off boolean, also indicate whether this page is not visible because of publishing dates or inherited status.