gazette.layout
Attributes
Classes
Extends the base layout class with methods related to chameleon |
|
A special layout for creating HTML E-Mails. |
Module Contents
- class gazette.layout.Layout(model: Any, request: onegov.gazette.request.GazetteRequest)[source]
Bases:
onegov.core.layout.ChameleonLayout
Extends the base layout class with methods related to chameleon template rendering.
This class assumes the existance of two templates:
layout.pt -> Contains the page skeleton with headers, body and so on.
macros.pt -> Contains chameleon macros.
- format_date(dt: datetime | date | None, format: str) str [source]
Returns a readable version of the given date while automatically converting to the principals timezone if the date is timezone aware.
- format_issue(issue: onegov.gazette.models.Issue, date_format: str = 'date', notice: GazetteNotice | None = None) str [source]
Returns the issues number and date and optionally the publication number of the given notice.