gazette.models.issue
Classes
An issue, which consists of a year and a number. |
|
A general file (image, document, pdf, etc), referenced in the database. |
|
Defines an issue. |
Module Contents
- class gazette.models.issue.IssueName[source]
Bases:
NamedTuple
An issue, which consists of a year and a number.
The issue might be converted from to a string in the form of ‘year-number’ for usage in forms and databases.
- class gazette.models.issue.IssuePdfFile[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.
- class gazette.models.issue.Issue[source]
Bases:
onegov.core.orm.Base
,onegov.core.orm.mixins.TimestampMixin
,onegov.file.AssociatedFiles
Defines an issue.
- notices(state: NoticeState | None = None) Query[GazetteNotice] [source]
Returns a query to get all notices related to this issue.
- property first_publication_number: int[source]
Returns the first publication number of this issue based on the last issue of the same year.
- publication_numbers(state: NoticeState | None = None) dict[int, str | None] [source]
Returns a dictionary containing all publication numbers (by notice) of this issue.
- date_observer(date_: datetime.date) None [source]
Changes the issue date of the notices when updating the date of the issue.
At this moment, the transaction is not yet commited: Querying the current issue returns the old date.
- publish(request: onegov.gazette.request.GazetteRequest) None [source]
Publishes the issue.
This ensures that every accepted notice of this issue is published. It then creates the PDF while assigning the publications numbers (it uses the highest publication number of the last issue of the same year as a starting point.