election_day.app
¶
Module Contents¶
Classes¶
The election day application. Include this in your onegov.yml to serve |
Functions¶
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- class election_day.app.ElectionDayApp[source]¶
Bases:
onegov.core.Framework
,onegov.form.FormApp
,onegov.user.UserApp
,onegov.file.DepotApp
The election day application. Include this in your onegov.yml to serve it with onegov-server.
- property principal: Canton | Municipality[source]¶
Returns the principal of the election day app. See
onegov.election_day.models.principal.Principal
.
- property logo: onegov.core.filestorage.FilestorageFile | None[source]¶
Returns the logo as
onegov.core.filestorage.FilestorageFile
.
- load_principal() Canton | Municipality | None [source]¶
The principal is defined in the
principal.yml
file stored on the applications filestorage root.If the file does not exist, the site root does not exist and therefore a 404 is returned.
The structure of the yaml file is defined in class:onegov.election_app.model.Principal.
- election_day.app.org_content_security_policy() more.content_security.ContentSecurityPolicy [source]¶
- election_day.app.enable_iframes_and_analytics_tween_factory(app: ElectionDayApp, handler: Callable[[ElectionDayRequest], Response]) Callable[[ElectionDayRequest], Response] [source]¶
- election_day.app.override_language_tween_factory(app: ElectionDayApp, handler: Callable[[ElectionDayRequest], Response]) Callable[[ElectionDayRequest], Response] [source]¶
- election_day.app.cache_control_tween_factory(app: ElectionDayApp, handler: Callable[[ElectionDayRequest], Response]) Callable[[ElectionDayRequest], Response] [source]¶
- election_day.app.micro_cache_anonymous_pages_tween_factory(app: ElectionDayApp, handler: Callable[[ElectionDayRequest], Response]) Callable[[ElectionDayRequest], Response] [source]¶