org.models.organisation

Contains the model describing the organisation proper.

Classes

Organisation

Defines the basic information associated with an organisation.

Functions

flatten_event_filter_fields_from_definition(...)

Module Contents

class org.models.organisation.Organisation[source]

Bases: onegov.core.orm.Base, onegov.core.orm.mixins.TimestampMixin

Defines the basic information associated with an organisation.

It is assumed that there’s only one organisation record in the schema!

__tablename__ = 'organisations'[source]
id: Column[uuid.UUID][source]
name: Column[str][source]
logo_url: Column[str | None][source]
theme_options: Column[dict[str, Any] | None][source]
meta: Column[dict[str, Any]][source]
custom_css: onegov.core.orm.mixins.dict_property[str | None][source]
contact: onegov.core.orm.mixins.dict_property[str | None][source]
contact_url: onegov.core.orm.mixins.dict_property[str | None][source]
opening_hours: onegov.core.orm.mixins.dict_property[str | None][source]
opening_hours_url: onegov.core.orm.mixins.dict_property[str | None][source]
about_url: onegov.core.orm.mixins.dict_property[str | None][source]
reply_to: onegov.core.orm.mixins.dict_property[str | None][source]
analytics_code[source]
online_counter_label: onegov.core.orm.mixins.dict_property[str | None][source]
hide_online_counter: onegov.core.orm.mixins.dict_property[bool | None][source]
reservations_label: onegov.core.orm.mixins.dict_property[str | None][source]
hide_reservations: onegov.core.orm.mixins.dict_property[bool | None][source]
publications_label: onegov.core.orm.mixins.dict_property[str | None][source]
hide_publications: onegov.core.orm.mixins.dict_property[bool | None][source]
event_limit_homepage: onegov.core.orm.mixins.dict_property[int][source]
news_limit_homepage: onegov.core.orm.mixins.dict_property[int][source]
focus_widget_image: onegov.core.orm.mixins.dict_property[str | None][source]
daypass_label: onegov.core.orm.mixins.dict_property[str | None][source]
e_move_label: onegov.core.orm.mixins.dict_property[str | None][source]
e_move_url: onegov.core.orm.mixins.dict_property[str | None][source]
default_map_view: onegov.core.orm.mixins.dict_property[dict[str, Any] | None][source]
homepage_structure: onegov.core.orm.mixins.dict_property[str | None][source]
homepage_cover[source]
square_logo_url: onegov.core.orm.mixins.dict_property[str | None][source]
locales: onegov.core.orm.mixins.dict_property[str | None][source]
redirect_homepage_to: onegov.core.orm.mixins.dict_property[str | None][source]
redirect_path: onegov.core.orm.mixins.dict_property[str | None][source]
hidden_people_fields: onegov.core.orm.mixins.dict_property[list[str]][source]
event_locations: onegov.core.orm.mixins.dict_property[list[str]][source]
geo_provider: onegov.core.orm.mixins.dict_property[str][source]
holiday_settings: onegov.core.orm.mixins.dict_property[dict[str, Any]][source]
standard_image: onegov.core.orm.mixins.dict_property[str | None][source]
submit_events_visible: onegov.core.orm.mixins.dict_property[bool][source]
delete_past_events: onegov.core.orm.mixins.dict_property[bool][source]
event_filter_type: onegov.core.orm.mixins.dict_property[str][source]
event_filter_definition: onegov.core.orm.mixins.dict_property[str | None][source]
event_filter_configuration: onegov.core.orm.mixins.dict_property[dict[str, Any]][source]
event_files = None[source]
facebook_url: onegov.core.orm.mixins.dict_property[str | None][source]
twitter_url: onegov.core.orm.mixins.dict_property[str | None][source]
youtube_url: onegov.core.orm.mixins.dict_property[str | None][source]
instagram_url: onegov.core.orm.mixins.dict_property[str | None][source]
linkedin_url: onegov.core.orm.mixins.dict_property[str | None][source]
tiktok_url: onegov.core.orm.mixins.dict_property[str | None][source]
og_logo_default: onegov.core.orm.mixins.dict_property[str | None][source]
partner_1_img: onegov.core.orm.mixins.dict_property[str | None][source]
partner_1_url: onegov.core.orm.mixins.dict_property[str | None][source]
partner_1_name: onegov.core.orm.mixins.dict_property[str | None][source]
partner_2_img: onegov.core.orm.mixins.dict_property[str | None][source]
partner_2_url: onegov.core.orm.mixins.dict_property[str | None][source]
partner_2_name: onegov.core.orm.mixins.dict_property[str | None][source]
partner_3_img: onegov.core.orm.mixins.dict_property[str | None][source]
partner_3_url: onegov.core.orm.mixins.dict_property[str | None][source]
partner_3_name: onegov.core.orm.mixins.dict_property[str | None][source]
partner_4_img: onegov.core.orm.mixins.dict_property[str | None][source]
partner_4_url: onegov.core.orm.mixins.dict_property[str | None][source]
partner_4_name: onegov.core.orm.mixins.dict_property[str | None][source]
always_show_partners: onegov.core.orm.mixins.dict_property[bool][source]
email_for_new_tickets: onegov.core.orm.mixins.dict_property[str | None][source]
ticket_auto_accept_style: onegov.core.orm.mixins.dict_property[str | None][source]
ticket_auto_accepts: onegov.core.orm.mixins.dict_property[list[str] | None][source]
ticket_auto_accept_roles: onegov.core.orm.mixins.dict_property[list[str] | None][source]
tickets_skip_opening_email: onegov.core.orm.mixins.dict_property[list[str] | None][source]
tickets_skip_closing_email: onegov.core.orm.mixins.dict_property[list[str] | None][source]
mute_all_tickets: onegov.core.orm.mixins.dict_property[bool | None][source]
ticket_always_notify: onegov.core.orm.mixins.dict_property[bool][source]
auto_closing_user: onegov.core.orm.mixins.dict_property[str | None][source]
report_changes: onegov.core.orm.mixins.dict_property[bool | None][source]
pdf_layout: onegov.core.orm.mixins.dict_property[str | None][source]
page_break_on_level_root_pdf: onegov.core.orm.mixins.dict_property[int | None][source]
page_break_on_level_org_pdf: onegov.core.orm.mixins.dict_property[int | None][source]
agency_display_levels: onegov.core.orm.mixins.dict_property[list[int] | None][source]
header_options: onegov.core.orm.mixins.dict_property[dict[str, Any]][source]
agency_path_display_on_people: onegov.core.orm.mixins.dict_property[bool][source]
agency_phone_internal_digits: onegov.core.orm.mixins.dict_property[int | None][source]
agency_phone_internal_field: onegov.core.orm.mixins.dict_property[str][source]
favicon_win_url: onegov.core.orm.mixins.dict_property[str | None][source]
favicon_mac_url: onegov.core.orm.mixins.dict_property[str | None][source]
favicon_apple_touch_url: onegov.core.orm.mixins.dict_property[str | None][source]
favicon_pinned_tab_safari_url: onegov.core.orm.mixins.dict_property[str | None][source]
open_files_target_blank: onegov.core.orm.mixins.dict_property[bool][source]
disable_page_refs: onegov.core.orm.mixins.dict_property[bool][source]
footer_left_width: onegov.core.orm.mixins.dict_property[int][source]
footer_center_width: onegov.core.orm.mixins.dict_property[int][source]
footer_right_width: onegov.core.orm.mixins.dict_property[int][source]
show_newsletter: onegov.core.orm.mixins.dict_property[bool][source]
secret_content_allowed: onegov.core.orm.mixins.dict_property[bool][source]
newsletter_categories: onegov.core.orm.mixins.dict_property[dict[str, list[dict[str, list[str]] | str]]][source]
chat_staff: onegov.core.orm.mixins.dict_property[list[str] | None][source]
enable_chat: onegov.core.orm.mixins.dict_property[bool][source]
specific_opening_hours: onegov.core.orm.mixins.dict_property[bool][source]
opening_hours_chat: onegov.core.orm.mixins.dict_property[list[list[str]] | None][source]
chat_topics: onegov.core.orm.mixins.dict_property[list[str] | None][source]
gever_username: onegov.core.orm.mixins.dict_property[str | None][source]
gever_password: onegov.core.orm.mixins.dict_property[str | None][source]
gever_endpoint: onegov.core.orm.mixins.dict_property[str | None][source]
auto_archive_timespan: onegov.core.orm.mixins.dict_property[int][source]
auto_delete_timespan: onegov.core.orm.mixins.dict_property[int][source]
mtan_access_window_seconds: onegov.core.orm.mixins.dict_property[int | None][source]
mtan_access_window_requests: onegov.core.orm.mixins.dict_property[int | None][source]
mtan_session_duration_seconds: onegov.core.orm.mixins.dict_property[int | None][source]
ogd_publisher_mail: onegov.core.orm.mixins.dict_property[str | None][source]
ogd_publisher_id: onegov.core.orm.mixins.dict_property[str | None][source]
ogd_publisher_name: onegov.core.orm.mixins.dict_property[str | None][source]
property mtan_access_window: datetime.timedelta[source]
property mtan_session_duration: datetime.timedelta[source]
property public_identity: str[source]

The public identity is a globally unique SHA 256 hash of the current organisation.

Basically, this is the database record of the database, but mangled for security and because it is cooler 😎.

This value can be accessed through /identity.

property holidays: onegov.org.models.swiss_holidays.SwissHolidays[source]

Returns a SwissHolidays instance, as configured by the holiday_settings on the UI.

property has_school_holidays: bool[source]

Returns whether any school holidays have been configured

property school_holidays: Iterator[tuple[date, date]][source]

Returns an iterable that yields date pairs of start and end dates of school holidays

property contact_html: markupsafe.Markup[source]
property opening_hours_html: markupsafe.Markup[source]
property title: str[source]
property title_lines: tuple[str, str][source]
excluded_person_fields(request: onegov.org.request.OrgRequest) list[str][source]
property event_filter_fields: tuple[onegov.form.parser.core.ParsedField, Ellipsis][source]
org.models.organisation.flatten_event_filter_fields_from_definition(definition: str) tuple[onegov.form.parser.core.ParsedField, Ellipsis][source]