About
Versioned legal documents (privacy notice, terms, cookies) with their history, acceptance at sign-up, the third parties and cookies the features declare, footer links and a panel
Provides
Models
LegalAcceptanceLegalDocumentLegalDocumentTextLegalDocumentVersion
Services
LegalService
Routes
/admin/legal/admin/legal/<int:document_id>/admin/legal/<int:document_id>/delete/admin/legal/<int:document_id>/edit/admin/legal/<int:document_id>/versions/<int:version_id>/admin/legal/<int:document_id>/versions/<int:version_id>/delete/admin/legal/<int:document_id>/versions/<int:version_id>/edit/admin/legal/<int:document_id>/versions/<int:version_id>/publish/admin/legal/<int:document_id>/versions/new/admin/legal/new/legal/<slug>/legal/<slug>/versions/legal/<slug>/versions/<int:number>/legal/accept/legal/accepted
Hooks filled
layout.authenticated_sidebarlayout.footer
Signals
legal-document-published
Translations
es
Commands
-
$
splent feature:legal helloExample command, replace it with your own.
Run them in your workspace once the feature is installed in the selected product.
Configuration
| Setting | Default | What it does |
|---|---|---|
LEGAL_ACCEPTANCE_GATE |
true
|
A signed-in account with a required text to accept (one it never accepted, or a version that asks again) is sent to /legal/accept before any other page. false asks only at sign-up. |
LEGAL_GATE_OPEN_ENDPOINTS |
empty | Endpoints such an account may still open, besides legal's own pages and the ones the features keep open themselves (register_gate_exemption): a page where it deletes its account or exports its data, say. |
These are the defaults. A product changes them in its own pyproject.toml, under [tool.splent.config], or in .env.deploy in production.
Dependencies
In product lines
- cms_spl Optional in this line
- openhubs_spl Optional in this line
Extension points
Templates
hooks/footer_links.htmllegal/accept.htmllegal/accepted.htmllegal/admin/document.htmllegal/admin/form.htmllegal/admin/list.htmllegal/admin/version.htmllegal/admin/version_form.htmllegal/page.htmllegal/versions.html
Services
LegalService
Models
LegalAcceptanceLegalDocumentLegalDocumentTextLegalDocumentVersion
Routes
A refinement can add routes to its blueprint
Other features fill its hook slots. A refinement can override its templates and services or extend its models without forking it.
Compatibility
Python
>=3.13
SPLENT framework
>=1.30.0