Onegov Page API

Model

class onegov.page.model.Page(title, parent=None, **kwargs)[source]

Defines a generic page.

Collection

class onegov.page.collection.PageCollection(session)[source]

Manages a hierarchy of pages.

Use it like this:

from onegov.page import PageCollection pages = PageCollection(session)

copy(page, parent)[source]

Takes the given page and copies it to a given parent.

The parent may be the same as the given page or another. If there’s a conflict with existing children, the name is adjusted using get_unique_child_name().