wagtailapproval.models¶
-
class
ApprovalPipeline
(*args, **kwargs)[source]¶ Bases:
wagtail.wagtailcore.models.Page
This page type is a very simple page that is only used to hold steps
-
class
ApprovalStep
(*args, **kwargs)[source]¶ Bases:
wagtail.wagtailcore.models.Page
Holds posts and facilitates the automatic moving to other steps in the same pipeline on approval and rejection.
-
automatic_approval
(obj)[source]¶ Possibly runs processing on an object for automatic approval or rejection
-
base_form_class
¶ alias of
StepForm
-
fix_permissions
()[source]¶ Set proper restrictions for the owned collection and all owned pages. Does not perform a save, so it can be safely used in a post_save signal.
-
get_items
(user)[source]¶ Gets an iterator of approval items, for rendering in templates. In practice, this returns a generator. If you need a stable view, use this to construct a list or tuple.
-
-
class
ApprovalTicket
(*args, **kwargs)[source]¶ Bases:
django.db.models.base.Model
A special junction table to reference an arbitrary item by uuid.
This is used to create an arbitrary approval/rejection URL, as it would be very difficult to do otherwise (as an approval step can own arbitrary pages and collection members with conflicting PKs otherwise). UUID is done for a minor security gain (prevent people from being able to try to act on arbitrary PKs, though that will be prevented through user privileges anyway, and the UUID should only be used for approvals and rejections, not GETs), as well as making the URL more opaque.