gazette.app

Classes

GazetteApp

The gazette application. Include this in your onegov.yml to serve

Functions

get_static_directory(→ str)

get_template_directory(→ str)

get_theme(→ onegov.gazette.theme.GazetteTheme)

get_i18n_localedirs(→ list[str])

get_i18n_used_locales(→ set[str])

get_i18n_default_locale(→ str)

get_content_security_policy(...)

get_shared_assets_path(→ str)

get_js_path(→ str)

get_css_path(→ str)

get_webasset_output(→ str)

get_frameworks_asset(→ Iterator[str])

get_common_asset(→ Iterator[str])

Module Contents

class gazette.app.GazetteApp[source]

Bases: onegov.core.Framework, onegov.file.DepotApp, onegov.quill.QuillApp, onegov.form.FormApp, onegov.user.UserApp

The gazette application. Include this in your onegov.yml to serve it with onegov-server.

serve_static_files = True[source]

Returns True if /static files should be served. Needs to be enabled manually.

Note that even if the static files are not served, /static path is still served, it just won’t return anything but a 404.

Note also that static files are served publicly. You can override this in your application, but doing that and testing for it is on you!

See also: onegov.core.static.

property principal: onegov.gazette.models.Principal[source]

Returns the principal of the gazette app. See onegov.gazette.models.principal.Principal.

load_principal() onegov.gazette.models.Principal | 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.gazette.model.Principal.

Returns the logo as onegov.core.filestorage.FilestorageFile.

property logo_for_pdf: str | None[source]

Returns the SVG logo used for PDFs as string.

load_logo_for_pdf() str | None[source]
property theme_options: dict[str, str][source]

Returns the application-bound theme options.

gazette.app.get_static_directory() str[source]
gazette.app.get_template_directory() str[source]
gazette.app.get_theme() onegov.gazette.theme.GazetteTheme[source]
gazette.app.get_i18n_localedirs() list[str][source]
gazette.app.get_i18n_used_locales() set[str][source]
gazette.app.get_i18n_default_locale() str[source]
gazette.app.get_content_security_policy() more.content_security.ContentSecurityPolicy[source]
gazette.app.get_shared_assets_path() str[source]
gazette.app.get_js_path() str[source]
gazette.app.get_css_path() str[source]
gazette.app.get_webasset_output() str[source]
gazette.app.get_frameworks_asset() Iterator[str][source]
gazette.app.get_common_asset() Iterator[str][source]