adhocracy_core.sheets.versions module

Sheets to work with versionable resources.

interface IVersionable[source]

Extends: adhocracy_core.interfaces.ISheet

Maker interface for resources with the versionable sheet.

interface VersionableFollowsReference[source]

Extends: adhocracy_core.interfaces.NewVersionToOldVersion

versionable sheet reference to preceding versions.

validate_linear_history_no_merge(node: adhocracy_core.schema.SchemaNode, value: list)[source]

Validate lineare history (no merge) for the follows field.

Raises:Invalid – if len(value) != 1
deferred_validate_linear_history_no_fork(node: adhocracy_core.schema.SchemaNode, kw: dict)[source]

Validate lineare history (no fork) for the follows field.

Raises:Invalid – if value does not reference the last version.
class VersionableSchema(*arg, **kw)[source]

Bases: adhocracy_core.schema.MappingSchema

Versionable sheet data structure.

Set/get predecessor (follows) versions of this resource.

interface IForkableVersionable[source]

Extends: adhocracy_core.sheets.versions.IVersionable

Maker interface for resources that support forking.

This means that the multiple heads are allowed (the LAST tag can point to two or more versions).

interface IVersions[source]

Extends: adhocracy_core.interfaces.ISheet

Marker interface for the versions sheet.

interface IVersionsElementsReference[source]

Extends: adhocracy_core.interfaces.SheetToSheet

Version sheet elements reference.

class VersionsSchema(*arg, **kw)[source]

Bases: adhocracy_core.schema.MappingSchema

Versions sheet data structure.

elements: Dag for collecting all versions of one item.

includeme(config)[source]

Register sheets.