thunderbird_accounts.legal.models
Classes
|
|
|
Audit log of user responses (accept/decline) to legal documents. |
- class thunderbird_accounts.legal.models.LegalDocument(uuid, created_at, updated_at, document_type, version, is_current, content_path)[source]
Bases:
BaseModel- Parameters:
uuid (UUIDField) – Primary key: Uuid
created_at (DateTimeField) – Created at
updated_at (DateTimeField) – Updated at
document_type (CharField) – Document type
version (CharField) – Version. Version number of the document, e.g. “1.0”
is_current (BooleanField) – Is current
content_path (CharField) – Content path. Relative path to content directory under assets/legal/, e.g. “tos/v1.0”
Reverse relationships:
- Parameters:
responses (Reverse
ForeignKeyfromLegalDocumentResponse) – All responses of this legal document (related name ofdocument)
- save(*args, **kwargs)[source]
Save the current instance. Override this in a subclass if you want to control the saving process.
The ‘force_insert’ and ‘force_update’ parameters can be used to insist that the “save” must be an SQL insert or update (or equivalent for non-SQL backends), respectively. Normally, they should not be set.
- exception DoesNotExist
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned
Bases:
MultipleObjectsReturned
- exception NotUpdated
Bases:
ObjectNotUpdated,DatabaseError
- class thunderbird_accounts.legal.models.LegalDocumentResponse(*args, **kwargs)[source]
Bases:
BaseModelAudit log of user responses (accept/decline) to legal documents.
- Parameters:
uuid (UUIDField) – Primary key: Uuid
created_at (DateTimeField) – Created at
updated_at (DateTimeField) – Updated at
action (CharField) – Action
source_context (CharField) – Source context. Where the user responded from, e.g. “sign-up”, “dashboard”, “thundermail”
Relationship fields:
- Parameters:
user (
ForeignKeytoUser) – User (related name:legal_responses)document (
ForeignKeytoLegalDocument) – Document (related name:responses)
- exception DoesNotExist
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned
Bases:
MultipleObjectsReturned
- exception NotUpdated
Bases:
ObjectNotUpdated,DatabaseError