signoffs.core.models.stamps#
A âStamp of Approvalâ is the persistence layer that backs an Approval - the timestamp that seals the Approval. - often models the set of related Signets that define the Approvalâs âSigning Orderâ. A concrete Stamp may have other information about, or perhaps a relation to, the thing being approved.
A Stamp records status of an Approval, and is often automated by business logic defining when the Approval is complete. An approved Stamp record provides evidence that a particular Approval was granted and by whom (via signatories). A Stamp may be granted directly if business rules dictate, but normally is granted via one or more Signets. Otherwise, a Stamp is not ordinarily edited directly - add and revoke Signets to move it through its signing order. Once granted, the Stamp persists its âapprovedâ status, regardless of the state of underlying Signets or changes to the Approval process. To revoke a Stamp, we alter the approval status and revoke the Signet(s) used to grant the Approval. A âblameâ history, may be maintained by using a RevokeSignet model on the Approval Type.
Module Contents#
Classes#
A Signet representing one signature on an Approval. The Approval Stamp related_name must be âsignatoriesâ |
|
Custom queries for Approval Seal |
|
Abstract base class for all âStamp of Approvalâ models A Stamp is the model often on the One side of a Many-To-One relation from an ApprovalSignet Persistence layer that timestamps an approval: who, when, what (what is supplied by concrete class, e.g., with a FK to other model) |
Functions#
Raise ValidationError if value is not a registered Approval Type ID |
Data#
API#
- class signoffs.core.models.stamps.AbstractApprovalSignet(*args, **kwargs)[source]#
Bases:
signoffs.core.models.signets.AbstractSignetA Signet representing one signature on an Approval. The Approval Stamp related_name must be âsignatoriesâ
Initialization
- stamp#
None
- class Meta[source]#
Bases:
signoffs.core.models.signets.AbstractSignet.Meta- abstract#
True
- class signoffs.core.models.stamps.ApprovalStampQuerySet(model=None, query=None, using=None, hints=None)[source]#
Bases:
django.db.models.QuerySetCustom queries for Approval Seal
Initialization
- signoffs.core.models.stamps.ApprovalStampManager#
None
- signoffs.core.models.stamps.validate_approval_id(value)[source]#
Raise ValidationError if value is not a registered Approval Type ID
- class signoffs.core.models.stamps.AbstractApprovalStamp(*args, **kwargs)[source]#
Bases:
django.db.models.ModelAbstract base class for all âStamp of Approvalâ models A Stamp is the model often on the One side of a Many-To-One relation from an ApprovalSignet Persistence layer that timestamps an approval: who, when, what (what is supplied by concrete class, e.g., with a FK to other model)
Initialization
- approval_id#
None
- approved#
None
- timestamp#
None
- objects#
None
- read_only_fields#
(âapproval_idâ, âtimestampâ)
- property approval_type#
Return the Approval Type (class) that governs this stamp
- property approval#
The Approval instance for this stamp
- is_approved()[source]#
return True if this Stamp is approved and has a persistent representation in DB
signoffs.contrib.approvals.models#
Basic concrete implementations for ApprovalStamp related models
Module Contents#
Classes#
A concrete persistence layer for a basic Signet with a relation to an ApprovalStamp |
|
A concrete persistence layer for tracking revoked Approval Signets. May be declared on Approval Types to provide persistence / tracking of revoked signoffs. |
|
A concrete persistence layer for basic Approval Types |
API#
- class signoffs.contrib.approvals.models.Signet(*args, **kwargs)[source]#
Bases:
signoffs.core.models.AbstractApprovalSignetA concrete persistence layer for a basic Signet with a relation to an ApprovalStamp
Initialization
- class signoffs.contrib.approvals.models.RevokedSignet(*args, **kwargs)[source]#
Bases:
signoffs.core.models.AbstractRevokedSignetA concrete persistence layer for tracking revoked Approval Signets. May be declared on Approval Types to provide persistence / tracking of revoked signoffs.
Initialization