Onegov Town API

Application

class onegov.town6.app.TownApp[source]
config = <dectate.app.Config object>

Config object that contains the configuration after commit.

This is installed when the class object is initialized, so during import-time when you use the class statement and subclass dectate.App, but is only filled after you commit the configuration.

This keeps the final configuration result after commit. It is a very dumb object that has no methods and is just a container for attributes that contain the real configuration.

dectate = <dectate.config.Configurable object>

A dectate Configurable instance is installed here.

This is installed when the class object is initialized, so during import-time when you use the class statement and subclass dectate.App.

This keeps tracks of the registrations done by using directives as long as committed configurations.

onegov.town6.app.get_public_ticket_messages() tuple[str, ...][source]

Returns a list of message types which are availble on the ticket status page, visible to anyone that knows the unguessable url.

Views

The settings view, defining things like the logo or color of the org.

Theme

class onegov.town6.theme.TownTheme(compress: bool = True)[source]
property default_options: dict[str, Any]

Default options used when compiling the theme.

property foundation_styles: Sequence[str]

The default styles

property foundation_components: tuple[str, ...]

Foundation components except the grid without the prefix as in app.scss that will be included. Be aware that order matters. These are included, not imported.

property pre_imports: list[str]

Imports added before the foundation import. The imports must be found in one of the paths (see extra_search_paths).

The form of a single import is ‘example’ (which would search for files named ‘example.scss’)

property post_imports: list[str]

Our scss code split into various files

property extra_search_paths: list[str]

A list of absolute search paths added before the actual foundation search path.

property font_search_path: str

Load fonts of the current theme folder and ignore fonts from parent applications if OrgTheme is inherited.

property additional_font_families: dict[str, str]

Returns the filenames as they are to use as label in the settings as well as to construct the font-family string. Only sans-serif fonts are supported by now.

Initial Content

Homepage Widgets

class onegov.town6.homepage_widgets.EventCard(text, url, subtitle, image_url, location, lead)[source]
text: str

Alias for field number 0

url: str

Alias for field number 1

subtitle: str

Alias for field number 2

image_url: str | None

Alias for field number 3

location: str | None

Alias for field number 4

lead: str

Alias for field number 5

class onegov.town6.homepage_widgets.RSSItem(title: str, description: str, guid: str, pubDate: datetime | None)[source]

The elements inside <item>

title: str

Alias for field number 0

description: str

Alias for field number 1

guid: str

Alias for field number 2

pubDate: datetime | None

Alias for field number 3

class onegov.town6.homepage_widgets.RSSChannel(title: str, link: str, description: str, language: str, copyright: str, items: Iterator[RSSItem])[source]

The elements inside <channel>

title: str

Alias for field number 0

Alias for field number 1

description: str

Alias for field number 2

language: str

Alias for field number 3

copyright: str

Alias for field number 4

items: Iterator[RSSItem]

Alias for field number 5