Package: django-signoffs
Django SignoffsA mico-framework for collecting lightweight, non-crypto "signatures" for virtually anything.Signoff- a permitted user agrees to something at a time.Approval- a set ofSignoffsthat trigger a state change when theSigningOrderis complete.Approval Process- a sequence ofApprovalsthat drive a Finite State Machine.Quick StartInstall thedjango-signoffspackage from PyPI$pipinstalldjango-signoffsAddsignoffstoINSTALLED_APPS:INSTALLED_APPS=[...,"signoffs",...,]Featuresdjango-signoffshas 3 tiers. Import and use only the features you need...signoffs.signoffsASignoffrecords that a user agreed to some statement at a time.signoffs.signoffsprovides a framework for defining use-cases
that fall within this broad requirement.Core features:AbstractSignetandAbstractRevokedSignetModels (persistence layer)BaseSignoffTypes, with injectable business and presentation logic...SignoffLogic(permissions and buisness logic)SignoffFormsManagerandSignoffRenderer(presentation layer)SignoffUrlsManager(custom end-points)Signoff "forward" relation:SignoffOneToOneFieldSignoff "reverse" relation Manager:SignoffSet(many-to-one)Declarative signing order automation:SigningOrderTemplate tag:{% render_signoff my_signoff %}signoffs.approvalsAnApprovalrecords whether some condition was met at some point in time.
Essentially, it is a 2-state machine, designed to change states
when one or moreSignoffsare completed, in some definedSigningOrder.Core features:AbstractApprovalSignetandAbstractApprovalStampModels (persistence layer)BaseApprovalTypes, with injectable business and presentation logic...ApprovalLogic(business logic)ApprovalStatusandApprovalRenderer(presentation layer)ApprovalUrlsManager(custom end-points)Approval "forward" relation:ApprovalOneToOneFieldApproval "reverse" relation Manager:ApprovalSet(experimental)Template tag:{% render_approval my_approval %}signoffs.processAnApprovalsProcessdefines a sequence ofApprovalsand the state changes and/or
side effects triggered by approving or revoking each of them.Core Features:ApprovalsProcess(a basic linear sequence ofApprovals)FsmApprovalsProcess(state-changes and sequencing defined bydjango-fsm)Opt-inContrib Modelssignoffs.contrib.signetsSignoffs core defines only abstract models, no migrations.signoffs.contrib.signetsprovide concrete models that cover the basic use-cases.  To opt-in, you must:INSTALLED_APPS=[...,"signoffs.contrib.signets",...,]$pythonmanage.pymigratesignoffs_signetsCore Features:Concrete Models:Signet, andRevokedSignetprovide persistence layer forConcrete Signoffs:SimpleSignoff,RevokableSignoff, andIrrevokableSignoffsignoffs.contrib.approvalsApprovals core defines only abstract models, no migrations.signoffs.contrib.approvalsprovide concrete models with basic relations.  To opt-in you must:INSTALLED_APPS=[...,"signoffs.contrib.approvals",...,]$pythonmanage.pymigratesignoffs_approvalsCore Features:Concrete Models:ApprovalSignet, andRevokedApprovalSignetdefine a FK relation to...Stampwhich provides persistence layer for...SimpleApprovalandIrrevokableApproval, which play nicely with...ApprovalSignoff, which uses the Concrete Models for persistence.FsmApprovalsProcessSignoffs is integrated withdjango-fsm,
allowing approval processes to drive a finite state machine.
To opt-in:$pipinstalldjango-signoffs[fsm]Get Me Some of ThatSource CodeRead The DocsIssuesPyPIMIT LicenseCheck Out the Demo Apppip install -e git+https://github.com/powderflask/django-signoffs.git#egg=django-signoffspython django-signoffs/manage.py install_demopython django-signoffs/manage.py runserverAcknowledgmentsSpecial thanks to BC Hydro,Chartwell,
and allContributorsTechnology ColophonWithout django and the django dev team, the universe would have fewer rainbows and ponies.
Signoffs approval process can be integrated on the deceptively cleverdjango_fsmFriendly Finite State Machine.
Signoffs uses a global registry as store for singleton code objects - thankspersisting_theory!This package was originally created withcookiecutterand thecookiecutter-pypackageproject template.For Developers$pipinstall-rreqirements_dev.txtTests$pytestor$toxCode Style / Linting$isort
$black
$flake8VersioningSemantic Versioning$bumpvershowDocsSphinx+MyST parserRead The DocsBuild / Deploy Automationinvoke$invoke-lGitHub Actions(see.github/workflows)GitHub Webhooks(seesettings/hooks)