Manages a hierarchy of pages.

Module Contents

class page.collection.PageCollection(session: sqlalchemy.orm.session.Session)[source]

Bases: onegov.core.orm.abstract.AdjacencyListCollection[]

Manages a hierarchy of pages.

Use it like this:

from import PageCollection pages = PageCollection(session)

copy(page:, parent: | None)[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().