adhocracy_core.resources.itemversion module

Basic versionable type typically for process content.

update_last_tag(version, registry, options)[source]

Get item in lineage of version and update last tag to version.

This needs to be the first ‘after_creation’ script executed, to assure the last tag is updated before any from adhocracy_core.interfaces import IItemVersionNewVersionAdded is send.

notify_new_itemversion_created(context, registry, options)[source]

Notify referencing Resources after creating a new ItemVersion.

Parameters:
  • context – the newly created resource
  • registry – pyramid registry
  • option
    root_versions:
    List with root resources. Will be passed along to resources that reference old versions so they can decide whether they should update themselfes.
    creator:
    User resource that passed to the creation events.
    autupdated:
    Flag passed to the creation events
Returns:

None

includeme(config)[source]

Add resource type to registry.