org.models.editor

Contains the model describing the page editor.

Attributes

PageActionWithoutPage

Classes

Editor

Defines the model for the page editor. Required because pages need

Module Contents

org.models.editor.PageActionWithoutPage: TypeAlias = Literal['new', 'new-root'][source]
class org.models.editor.Editor(action: PageActionWithoutPage, page: None, trait: str)[source]
class org.models.editor.Editor(action: PageAction, page: org.models.traitinfo.TraitInfo, trait: str | None = None)
class org.models.editor.Editor(action: Literal['new', 'new-root'], page: None, trait: str | None = None)

Defines the model for the page editor. Required because pages need to be edited outside their url structure, since their urls are absorbed completely and turned into SQL queries.

action[source]
page[source]
trait[source]
static is_supported_action(action: str) TypeGuard[PageAction][source]

Returns True if the given action is supported.

property page_id: int[source]

Returns the page id so morepath can create a link to this.