paperap.models.share_links.model module
METADATA:
- File: share_links.py
Project: paperap
- Created: 2025-03-04
Version: 0.0.8
Author: Jess Mann Email: jess@jmann.me
Copyright (c) 2025 Jess Mann
LAST MODIFIED:
2025-03-04 By Jess Mann
- class paperap.models.share_links.model.ShareLinks(**data)[source]
Bases:
StandardModel- Parameters:
data (
Any)
- expiration: datetime | None
- slug: str | None
- document: int | None
- created: datetime | None
- file_version: ShareLinkFileVersionType | None
- owner: int | None
- class Meta(model)[source]
Bases:
Meta- Parameters:
model (type[_Self])
- queryset
alias of
ShareLinksQuerySet
- blacklist_filtering_params: ClassVar[set[str]] = {}
- field_map: dict[str, str] = {}
- filtering_disabled: ClassVar[set[str]] = {}
- filtering_fields: ClassVar[set[str]] = {'_resource', 'created', 'document', 'expiration', 'file_version', 'id', 'owner', 'slug'}
- read_only_fields: ClassVar[set[str]] = {'id'}
- supported_filtering_params: ClassVar[set[str]] = {'id', 'id__in', 'limit'}
- model: type[_Self]
- name: str
- serialize_datetime(value)[source]
Serialize a datetime object to an ISO 8601 formatted string
- Parameters:
value (
datetime) – The datetime object to serialize- Returns:
The serialized datetime
- Return type:
- get_document()[source]
Get the document associated with this share link
- Returns:
The document object
- Return type:
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'ignore', 'populate_by_name': True, 'use_enum_values': True, 'validate_assignment': True, 'validate_default': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_post_init(context: Any, /) → None
We need to both initialize private attributes and call the user-defined model_post_init method.
- id: int