directory.models.directory
¶
Module Contents¶
Classes¶
Generic enumeration. |
|
A general file (image, document, pdf, etc), referenced in the database. |
|
A directory of entries that share a common data structure. For example, |
Attributes¶
- directory.models.directory.InheritType: typing_extensions.TypeAlias = 'Literal[_Sentinel.INHERIT]'[source]¶
- class directory.models.directory._Sentinel[source]¶
Bases:
enum.Enum
Generic enumeration.
Derive from this class to define new enumerations.
- class directory.models.directory.DirectoryFile[source]¶
Bases:
onegov.file.File
A general file (image, document, pdf, etc), referenced in the database.
Thanks to the use of Depot files can be seemingly stored in the database (with transaction guarantees), without actually storing it in the database.
- property directory_entry: DirectoryEntry | None[source]¶
- class directory.models.directory.Directory[source]¶
Bases:
onegov.core.orm.Base
,onegov.core.orm.mixins.ContentMixin
,onegov.core.orm.mixins.TimestampMixin
,onegov.search.SearchableContent
,onegov.file.MultiAssociatedFiles
A directory of entries that share a common data structure. For example, a directory of people, of emergency services or playgrounds.
- property es_public: bool[source]¶
Returns True if the model is available to be found by the public. If false, only editors/admins will see this object in the search results.
- property entry_cls: _type[DirectoryEntry][source]¶
- configuration: Column[DirectoryConfiguration][source]¶
- entries: relationship[list[DirectoryEntry]][source]¶
- add(values: dict[str, Any], type: str | InheritType = INHERIT) directory.models.directory_entry.DirectoryEntry [source]¶
- add_by_form(form: DirectoryEntryForm, type: str | InheritType = INHERIT) directory.models.directory_entry.DirectoryEntry [source]¶
- update(entry: directory.models.directory_entry.DirectoryEntry, values: Mapping[str, Any], set_name: bool = False, force_update: bool = False) directory.models.directory_entry.DirectoryEntry [source]¶
- structure_configuration_observer(structure: str, configuration: directory.types.DirectoryConfiguration) None [source]¶