town6.layout

Attributes

NavigationEntry

T

Classes

PartnerCard

Layout

Contains methods to render a page inheriting from layout.pt.

DefaultLayout

The default layout meant for the public facing parts of the site.

DefaultMailLayout

A special layout for creating HTML E-Mails.

AdjacencyListLayout

The default layout meant for the public facing parts of the site.

SettingsLayout

The default layout meant for the public facing parts of the site.

PageLayout

The default layout meant for the public facing parts of the site.

NewsLayout

The default layout meant for the public facing parts of the site.

EditorLayout

The default layout meant for the public facing parts of the site.

FormEditorLayout

The default layout meant for the public facing parts of the site.

FormSubmissionLayout

For steps registered on layouts.

SurveySubmissionLayout

For steps registered on layouts.

FormCollectionLayout

The default layout meant for the public facing parts of the site.

SurveySubmissionWindowLayout

The default layout meant for the public facing parts of the site.

SurveyCollectionLayout

The default layout meant for the public facing parts of the site.

PersonCollectionLayout

The default layout meant for the public facing parts of the site.

PersonLayout

The default layout meant for the public facing parts of the site.

TicketsLayout

The default layout meant for the public facing parts of the site.

ArchivedTicketsLayout

The default layout meant for the public facing parts of the site.

TicketLayout

The default layout meant for the public facing parts of the site.

TicketNoteLayout

The default layout meant for the public facing parts of the site.

TicketChatMessageLayout

For steps registered on layouts.

TextModulesLayout

The default layout meant for the public facing parts of the site.

TextModuleLayout

The default layout meant for the public facing parts of the site.

ResourcesLayout

The default layout meant for the public facing parts of the site.

FindYourSpotLayout

The default layout meant for the public facing parts of the site.

ResourceRecipientsLayout

The default layout meant for the public facing parts of the site.

ResourceRecipientsFormLayout

The default layout meant for the public facing parts of the site.

ResourceLayout

The default layout meant for the public facing parts of the site.

ReservationLayout

For steps registered on layouts.

AllocationRulesLayout

The default layout meant for the public facing parts of the site.

AllocationEditFormLayout

Same as the resource layout, but with different editbar links, because

OccurrencesLayout

The default layout meant for the public facing parts of the site.

OccurrenceLayout

The default layout meant for the public facing parts of the site.

EventLayout

For steps registered on layouts.

NewsletterLayout

The default layout meant for the public facing parts of the site.

RecipientLayout

The default layout meant for the public facing parts of the site.

ImageSetCollectionLayout

The default layout meant for the public facing parts of the site.

ImageSetLayout

The default layout meant for the public facing parts of the site.

UserManagementLayout

The default layout meant for the public facing parts of the site.

UserLayout

The default layout meant for the public facing parts of the site.

UserGroupCollectionLayout

The default layout meant for the public facing parts of the site.

UserGroupLayout

The default layout meant for the public facing parts of the site.

ExportCollectionLayout

The default layout meant for the public facing parts of the site.

PaymentProviderLayout

The default layout meant for the public facing parts of the site.

PaymentCollectionLayout

The default layout meant for the public facing parts of the site.

MessageCollectionLayout

The default layout meant for the public facing parts of the site.

DirectoryCollectionLayout

The default layout meant for the public facing parts of the site.

DirectoryEntryCollectionLayout

For steps registered on layouts.

DirectoryEntryLayout

For steps registered on layouts.

PublicationLayout

The default layout meant for the public facing parts of the site.

DashboardLayout

The default layout meant for the public facing parts of the site.

GeneralFileCollectionLayout

The default layout meant for the public facing parts of the site.

ImageFileCollectionLayout

The default layout meant for the public facing parts of the site.

ExternalLinkLayout

The default layout meant for the public facing parts of the site.

HomepageLayout

The default layout meant for the public facing parts of the site.

ChatLayout

The default layout meant for the public facing parts of the site.

StaffChatLayout

The default layout meant for the public facing parts of the site.

ClientChatLayout

The default layout meant for the public facing parts of the site.

ChatInitiationFormLayout

The default layout meant for the public facing parts of the site.

ArchivedChatsLayout

The default layout meant for the public facing parts of the site.

Module Contents

town6.layout.NavigationEntry: TypeAlias = tuple[PageMeta, Link, tuple['NavigationEntry', ...]][source]
town6.layout.T[source]
class town6.layout.PartnerCard[source]

Bases: NamedTuple

url: str | None[source]
image_url: str | None[source]
lead: str | None[source]
class town6.layout.Layout(model: Any, request: onegov.town6.request.TownRequest, edit_mode: bool = False)[source]

Bases: onegov.org.layout.Layout

Contains methods to render a page inheriting from layout.pt.

All pages inheriting from layout.pt rely on this class being present as ‘layout’ variable:

@OrgApp.html(model=Example, template='example.pt', permission=Public)
   def view_example(self, request):
       return { 'layout': DefaultLayout(self, request) }

It is meant to be extended for different parts of the site. For example, the DefaultLayout includes the top navigation defined by onegov.page.

It’s possible though to have a different part of the website use a completely different top navigation. For that, a new Layout class inheriting from this one should be added.

app: onegov.town6.app.TownApp[source]

Returns the application behind the request.

request: onegov.town6.request.TownRequest[source]
edit_mode = False[source]
property primary_color: str[source]
property font_awesome_path: str[source]
property sentry_init_path: str[source]
property drilldown_back: str[source]
property on_homepage: bool[source]
property partners: list[PartnerCard][source]
property show_partners: bool[source]
property search_keybindings_help: str[source]
property page_collection: onegov.page.PageCollection[source]
page_by_path(path: str) Page | None[source]
class town6.layout.DefaultLayout(model: Any, request: onegov.org.request.OrgRequest, edit_mode: bool = False)[source]

Bases: onegov.org.layout.DefaultLayout, Layout

The default layout meant for the public facing parts of the site.

app: onegov.town6.app.TownApp[source]

Returns the application behind the request.

property top_navigation: tuple[NavigationEntry, Ellipsis][source]

Returns a list of onegov.org.elements.Link objects. Those links are used for the top navigation.

If nothing is returned, no top navigation is displayed.

property sortable_url_template: str[source]
class town6.layout.DefaultMailLayout(model: Any, request: onegov.core.request.CoreRequest)[source]

Bases: onegov.org.layout.DefaultMailLayout, Layout

A special layout for creating HTML E-Mails.

app: onegov.town6.app.TownApp[source]

Returns the application behind the request.

request: onegov.town6.request.TownRequest[source]
class town6.layout.AdjacencyListLayout(model: Any, request: onegov.org.request.OrgRequest, edit_mode: bool = False)[source]

Bases: onegov.org.layout.AdjacencyListLayout, DefaultLayout

The default layout meant for the public facing parts of the site.

app: onegov.town6.app.TownApp[source]

Returns the application behind the request.

request: onegov.town6.request.TownRequest[source]
class town6.layout.SettingsLayout(model: Any, request: onegov.org.request.OrgRequest, setting: str | None = None)[source]

Bases: onegov.org.layout.SettingsLayout, DefaultLayout

The default layout meant for the public facing parts of the site.

app: onegov.town6.app.TownApp[source]

Returns the application behind the request.

request: onegov.town6.request.TownRequest[source]
class town6.layout.PageLayout(model: Any, request: onegov.org.request.OrgRequest, edit_mode: bool = False)[source]

Bases: onegov.org.layout.PageLayout, AdjacencyListLayout

The default layout meant for the public facing parts of the site.

app: onegov.town6.app.TownApp[source]

Returns the application behind the request.

request: onegov.town6.request.TownRequest[source]
property contact_html: str[source]
class town6.layout.NewsLayout(model: Any, request: onegov.org.request.OrgRequest, edit_mode: bool = False)[source]

Bases: onegov.org.layout.NewsLayout, AdjacencyListLayout

The default layout meant for the public facing parts of the site.

app: onegov.town6.app.TownApp[source]

Returns the application behind the request.

request: onegov.town6.request.TownRequest[source]
property contact_html: str[source]
class town6.layout.EditorLayout(model: onegov.org.models.Editor, request: onegov.org.request.OrgRequest, site_title: str | None)[source]

Bases: onegov.org.layout.EditorLayout, DefaultLayout

The default layout meant for the public facing parts of the site.

app: onegov.town6.app.TownApp[source]

Returns the application behind the request.

request: onegov.town6.request.TownRequest[source]
class town6.layout.FormEditorLayout(model: FormDefinition | FormCollection | SurveyCollection | SurveyDefinition, request: onegov.org.request.OrgRequest)[source]

Bases: onegov.org.layout.FormEditorLayout, DefaultLayout

The default layout meant for the public facing parts of the site.

app: onegov.town6.app.TownApp[source]

Returns the application behind the request.

request: onegov.town6.request.TownRequest[source]
class town6.layout.FormSubmissionLayout(model: FormSubmission | FormDefinition, request: onegov.town6.request.TownRequest, title: str | None = None, *, hide_steps: bool = False)[source]

Bases: onegov.stepsequence.extension.StepsLayoutExtension, onegov.org.layout.FormSubmissionLayout, DefaultLayout

For steps registered on layouts.

app: onegov.town6.app.TownApp[source]

Returns the application behind the request.

request: onegov.town6.request.TownRequest[source]
model: FormSubmission | FormDefinition[source]
property step_position: int | None[source]

Can be overwritten by the model and based request params.

class town6.layout.SurveySubmissionLayout(model: SurveySubmission | SurveyDefinition, request: onegov.town6.request.TownRequest, title: str | None = None, *, hide_steps: bool = False)[source]

Bases: onegov.stepsequence.extension.StepsLayoutExtension, onegov.org.layout.SurveySubmissionLayout, DefaultLayout

For steps registered on layouts.

app: onegov.town6.app.TownApp[source]

Returns the application behind the request.

request: onegov.town6.request.TownRequest[source]
model: SurveySubmission | SurveyDefinition[source]
property step_position: int | None[source]

Can be overwritten by the model and based request params.

class town6.layout.FormCollectionLayout(model: Any, request: onegov.org.request.OrgRequest, edit_mode: bool = False)[source]

Bases: onegov.org.layout.FormCollectionLayout, DefaultLayout

The default layout meant for the public facing parts of the site.

app: onegov.town6.app.TownApp[source]

Returns the application behind the request.

request: onegov.town6.request.TownRequest[source]
property forms_url: str[source]
class town6.layout.SurveySubmissionWindowLayout(model: Any, request: onegov.org.request.OrgRequest, edit_mode: bool = False)[source]

Bases: onegov.org.layout.SurveySubmissionWindowLayout, DefaultLayout

The default layout meant for the public facing parts of the site.

app: onegov.town6.app.TownApp[source]

Returns the application behind the request.

request: onegov.town6.request.TownRequest[source]
class town6.layout.SurveyCollectionLayout(model: Any, request: onegov.org.request.OrgRequest, edit_mode: bool = False)[source]

Bases: onegov.org.layout.SurveyCollectionLayout, DefaultLayout

The default layout meant for the public facing parts of the site.

app: onegov.town6.app.TownApp[source]

Returns the application behind the request.

request: onegov.town6.request.TownRequest[source]
class town6.layout.PersonCollectionLayout(model: Any, request: onegov.org.request.OrgRequest, edit_mode: bool = False)[source]

Bases: onegov.org.layout.PersonCollectionLayout, DefaultLayout

The default layout meant for the public facing parts of the site.

app: onegov.town6.app.TownApp[source]

Returns the application behind the request.

request: onegov.town6.request.TownRequest[source]
class town6.layout.PersonLayout(model: Any, request: onegov.org.request.OrgRequest, edit_mode: bool = False)[source]

Bases: onegov.org.layout.PersonLayout, DefaultLayout

The default layout meant for the public facing parts of the site.

app: onegov.town6.app.TownApp[source]

Returns the application behind the request.

request: onegov.town6.request.TownRequest[source]
class town6.layout.TicketsLayout(model: Any, request: onegov.org.request.OrgRequest, edit_mode: bool = False)[source]

Bases: onegov.org.layout.TicketsLayout, DefaultLayout

The default layout meant for the public facing parts of the site.

app: onegov.town6.app.TownApp[source]

Returns the application behind the request.

request: onegov.town6.request.TownRequest[source]
class town6.layout.ArchivedTicketsLayout(model: Any, request: onegov.org.request.OrgRequest, edit_mode: bool = False)[source]

Bases: onegov.org.layout.ArchivedTicketsLayout, DefaultLayout

The default layout meant for the public facing parts of the site.

app: onegov.town6.app.TownApp[source]

Returns the application behind the request.

request: onegov.town6.request.TownRequest[source]
class town6.layout.TicketLayout(model: onegov.ticket.Ticket, request: onegov.org.request.OrgRequest)[source]

Bases: onegov.org.layout.TicketLayout, DefaultLayout

The default layout meant for the public facing parts of the site.

app: onegov.town6.app.TownApp[source]

Returns the application behind the request.

request: onegov.town6.request.TownRequest[source]

A of onegov.org.elements.LinkGroup classes. Each of them will be shown in the top editbar, with the group title being the dropdown title.

class town6.layout.TicketNoteLayout(model: onegov.ticket.Ticket, request: onegov.org.request.OrgRequest, title: str, ticket: None = None)[source]
class town6.layout.TicketNoteLayout(model: Any, request: onegov.org.request.OrgRequest, title: str, ticket: onegov.ticket.Ticket)

Bases: onegov.org.layout.TicketNoteLayout, DefaultLayout

The default layout meant for the public facing parts of the site.

app: onegov.town6.app.TownApp[source]

Returns the application behind the request.

request: onegov.town6.request.TownRequest[source]
class town6.layout.TicketChatMessageLayout(model: onegov.ticket.Ticket, request: onegov.town6.request.TownRequest, internal: bool = False, *, hide_steps: bool = False)[source]

Bases: onegov.stepsequence.extension.StepsLayoutExtension, onegov.org.layout.TicketChatMessageLayout, DefaultLayout

For steps registered on layouts.

app: onegov.town6.app.TownApp[source]

Returns the application behind the request.

request: onegov.town6.request.TownRequest[source]
property step_position: int[source]

Can be overwritten by the model and based request params.

class town6.layout.TextModulesLayout(model: Any, request: onegov.org.request.OrgRequest, edit_mode: bool = False)[source]

Bases: onegov.org.layout.TextModulesLayout, DefaultLayout

The default layout meant for the public facing parts of the site.

app: onegov.town6.app.TownApp[source]

Returns the application behind the request.

request: onegov.town6.request.TownRequest[source]
class town6.layout.TextModuleLayout(model: Any, request: onegov.org.request.OrgRequest, edit_mode: bool = False)[source]

Bases: onegov.org.layout.TextModuleLayout, DefaultLayout

The default layout meant for the public facing parts of the site.

app: onegov.town6.app.TownApp[source]

Returns the application behind the request.

request: onegov.town6.request.TownRequest[source]
class town6.layout.ResourcesLayout(model: Any, request: onegov.org.request.OrgRequest, edit_mode: bool = False)[source]

Bases: onegov.org.layout.ResourcesLayout, DefaultLayout

The default layout meant for the public facing parts of the site.

app: onegov.town6.app.TownApp[source]

Returns the application behind the request.

request: onegov.town6.request.TownRequest[source]
class town6.layout.FindYourSpotLayout(model: Any, request: onegov.org.request.OrgRequest, edit_mode: bool = False)[source]

Bases: onegov.org.layout.FindYourSpotLayout, DefaultLayout

The default layout meant for the public facing parts of the site.

app: onegov.town6.app.TownApp[source]

Returns the application behind the request.

request: onegov.town6.request.TownRequest[source]
class town6.layout.ResourceRecipientsLayout(model: Any, request: onegov.org.request.OrgRequest, edit_mode: bool = False)[source]

Bases: onegov.org.layout.ResourceRecipientsLayout, DefaultLayout

The default layout meant for the public facing parts of the site.

app: onegov.town6.app.TownApp[source]

Returns the application behind the request.

request: onegov.town6.request.TownRequest[source]
class town6.layout.ResourceRecipientsFormLayout(model: Any, request: onegov.org.request.OrgRequest, title: str)[source]

Bases: onegov.org.layout.ResourceRecipientsFormLayout, DefaultLayout

The default layout meant for the public facing parts of the site.

app: onegov.town6.app.TownApp[source]

Returns the application behind the request.

request: onegov.town6.request.TownRequest[source]
class town6.layout.ResourceLayout(model: onegov.reservation.Resource, request: onegov.org.request.OrgRequest)[source]

Bases: onegov.org.layout.ResourceLayout, DefaultLayout

The default layout meant for the public facing parts of the site.

app: onegov.town6.app.TownApp[source]

Returns the application behind the request.

request: onegov.town6.request.TownRequest[source]
class town6.layout.ReservationLayout(model: onegov.reservation.Resource, request: onegov.town6.request.TownRequest, *, hide_steps: bool = False)[source]

Bases: onegov.stepsequence.extension.StepsLayoutExtension, onegov.org.layout.ReservationLayout, ResourceLayout

For steps registered on layouts.

app: onegov.town6.app.TownApp[source]

Returns the application behind the request.

request: onegov.town6.request.TownRequest[source]

A of onegov.org.elements.LinkGroup classes. Each of them will be shown in the top editbar, with the group title being the dropdown title.

property step_position: int | None[source]

Note the last step is the ticket status page with step 3.

class town6.layout.AllocationRulesLayout(model: onegov.reservation.Resource, request: onegov.org.request.OrgRequest)[source]

Bases: onegov.org.layout.AllocationRulesLayout, DefaultLayout

The default layout meant for the public facing parts of the site.

app: onegov.town6.app.TownApp[source]

Returns the application behind the request.

request: onegov.town6.request.TownRequest[source]
class town6.layout.AllocationEditFormLayout(model: Any, request: onegov.org.request.OrgRequest, edit_mode: bool = False)[source]

Bases: onegov.org.layout.AllocationEditFormLayout, DefaultLayout

Same as the resource layout, but with different editbar links, because there’s not really an allocation view, but there are allocation forms.

app: onegov.town6.app.TownApp[source]

Returns the application behind the request.

request: onegov.town6.request.TownRequest[source]
class town6.layout.OccurrencesLayout(model: Any, request: onegov.org.request.OrgRequest, edit_mode: bool = False)[source]

Bases: onegov.org.layout.OccurrencesLayout, DefaultLayout

The default layout meant for the public facing parts of the site.

app: onegov.town6.app.TownApp[source]

Returns the application behind the request.

request: onegov.town6.request.TownRequest[source]

A of onegov.org.elements.LinkGroup classes. Each of them will be shown in the top editbar, with the group title being the dropdown title.

class town6.layout.OccurrenceLayout(model: onegov.event.Occurrence, request: onegov.org.request.OrgRequest)[source]

Bases: onegov.org.layout.OccurrenceLayout, DefaultLayout

The default layout meant for the public facing parts of the site.

app: onegov.town6.app.TownApp[source]

Returns the application behind the request.

request: onegov.town6.request.TownRequest[source]
class town6.layout.EventLayout(model: onegov.event.Event, request: onegov.town6.request.TownRequest, *, hide_steps: bool = False)[source]

Bases: onegov.stepsequence.extension.StepsLayoutExtension, onegov.org.layout.EventLayout, DefaultLayout

For steps registered on layouts.

app: onegov.town6.app.TownApp[source]

Returns the application behind the request.

request: onegov.town6.request.TownRequest[source]
model: onegov.event.Event[source]
property step_position: int[source]

Can be overwritten by the model and based request params.

class town6.layout.NewsletterLayout(model: Any, request: onegov.org.request.OrgRequest, edit_mode: bool = False)[source]

Bases: onegov.org.layout.NewsletterLayout, DefaultLayout

The default layout meant for the public facing parts of the site.

app: onegov.town6.app.TownApp[source]

Returns the application behind the request.

request: onegov.town6.request.TownRequest[source]
class town6.layout.RecipientLayout(model: Any, request: onegov.org.request.OrgRequest, edit_mode: bool = False)[source]

Bases: onegov.org.layout.RecipientLayout, DefaultLayout

The default layout meant for the public facing parts of the site.

app: onegov.town6.app.TownApp[source]

Returns the application behind the request.

request: onegov.town6.request.TownRequest[source]
class town6.layout.ImageSetCollectionLayout(model: Any, request: onegov.org.request.OrgRequest, edit_mode: bool = False)[source]

Bases: onegov.org.layout.ImageSetCollectionLayout, DefaultLayout

The default layout meant for the public facing parts of the site.

app: onegov.town6.app.TownApp[source]

Returns the application behind the request.

request: onegov.town6.request.TownRequest[source]
class town6.layout.ImageSetLayout(model: onegov.org.models.ImageSet, request: onegov.org.request.OrgRequest)[source]

Bases: onegov.org.layout.ImageSetLayout, DefaultLayout

The default layout meant for the public facing parts of the site.

app: onegov.town6.app.TownApp[source]

Returns the application behind the request.

request: onegov.town6.request.TownRequest[source]
class town6.layout.UserManagementLayout(model: Any, request: onegov.org.request.OrgRequest, edit_mode: bool = False)[source]

Bases: onegov.org.layout.UserManagementLayout, DefaultLayout

The default layout meant for the public facing parts of the site.

app: onegov.town6.app.TownApp[source]

Returns the application behind the request.

request: onegov.town6.request.TownRequest[source]
class town6.layout.UserLayout(model: Any, request: onegov.org.request.OrgRequest, edit_mode: bool = False)[source]

Bases: onegov.org.layout.UserLayout, DefaultLayout

The default layout meant for the public facing parts of the site.

app: onegov.town6.app.TownApp[source]

Returns the application behind the request.

request: onegov.town6.request.TownRequest[source]
class town6.layout.UserGroupCollectionLayout(model: Any, request: onegov.org.request.OrgRequest, edit_mode: bool = False)[source]

Bases: onegov.org.layout.UserGroupCollectionLayout, DefaultLayout

The default layout meant for the public facing parts of the site.

app: onegov.town6.app.TownApp[source]

Returns the application behind the request.

request: onegov.town6.request.TownRequest[source]
class town6.layout.UserGroupLayout(model: Any, request: onegov.org.request.OrgRequest, edit_mode: bool = False)[source]

Bases: onegov.org.layout.UserGroupLayout, DefaultLayout

The default layout meant for the public facing parts of the site.

app: onegov.town6.app.TownApp[source]

Returns the application behind the request.

request: onegov.town6.request.TownRequest[source]
class town6.layout.ExportCollectionLayout(model: Any, request: onegov.org.request.OrgRequest, edit_mode: bool = False)[source]

Bases: onegov.org.layout.ExportCollectionLayout, DefaultLayout

The default layout meant for the public facing parts of the site.

app: onegov.town6.app.TownApp[source]

Returns the application behind the request.

request: onegov.town6.request.TownRequest[source]
class town6.layout.PaymentProviderLayout(model: Any, request: onegov.org.request.OrgRequest, edit_mode: bool = False)[source]

Bases: onegov.org.layout.PaymentProviderLayout, DefaultLayout

The default layout meant for the public facing parts of the site.

app: onegov.town6.app.TownApp[source]

Returns the application behind the request.

request: onegov.town6.request.TownRequest[source]
class town6.layout.PaymentCollectionLayout(model: Any, request: onegov.org.request.OrgRequest, edit_mode: bool = False)[source]

Bases: onegov.org.layout.PaymentCollectionLayout, DefaultLayout

The default layout meant for the public facing parts of the site.

app: onegov.town6.app.TownApp[source]

Returns the application behind the request.

request: onegov.town6.request.TownRequest[source]
class town6.layout.MessageCollectionLayout(model: Any, request: onegov.org.request.OrgRequest)[source]

Bases: onegov.org.layout.MessageCollectionLayout, DefaultLayout

The default layout meant for the public facing parts of the site.

app: onegov.town6.app.TownApp[source]

Returns the application behind the request.

request: onegov.town6.request.TownRequest[source]
class town6.layout.DirectoryCollectionLayout(model: DirectoryCollection[Any] | DirectoryEntryCollection[Any], request: onegov.org.request.OrgRequest)[source]

Bases: onegov.org.layout.DirectoryCollectionLayout, DefaultLayout

The default layout meant for the public facing parts of the site.

app: onegov.town6.app.TownApp[source]

Returns the application behind the request.

request: onegov.town6.request.TownRequest[source]
class town6.layout.DirectoryEntryCollectionLayout(*args: Any, hide_steps: bool = False, **kwargs: Any)[source]

Bases: onegov.stepsequence.extension.StepsLayoutExtension, onegov.org.layout.DirectoryEntryCollectionLayout, DefaultLayout

For steps registered on layouts.

app: onegov.town6.app.TownApp[source]

Returns the application behind the request.

property step_position: int[source]

Can be overwritten by the model and based request params.

A of onegov.org.elements.LinkGroup classes. Each of them will be shown in the top editbar, with the group title being the dropdown title.

class town6.layout.DirectoryEntryLayout(model: onegov.org.models.ExtendedDirectoryEntry, request: onegov.town6.request.TownRequest, *, hide_steps: bool = False)[source]

Bases: onegov.stepsequence.extension.StepsLayoutExtension, onegov.org.layout.DirectoryEntryLayout, DefaultLayout

For steps registered on layouts.

app: onegov.town6.app.TownApp[source]

Returns the application behind the request.

request: onegov.town6.request.TownRequest[source]
property step_position: int[source]

Can be overwritten by the model and based request params.

class town6.layout.PublicationLayout(model: Any, request: onegov.org.request.OrgRequest)[source]

Bases: onegov.org.layout.PublicationLayout, DefaultLayout

The default layout meant for the public facing parts of the site.

app: onegov.town6.app.TownApp[source]

Returns the application behind the request.

request: onegov.town6.request.TownRequest[source]
class town6.layout.DashboardLayout(model: Any, request: onegov.org.request.OrgRequest, edit_mode: bool = False)[source]

Bases: onegov.org.layout.DashboardLayout, DefaultLayout

The default layout meant for the public facing parts of the site.

app: onegov.town6.app.TownApp[source]

Returns the application behind the request.

request: onegov.town6.request.TownRequest[source]
class town6.layout.GeneralFileCollectionLayout(model: Any, request: onegov.town6.request.TownRequest)[source]

Bases: DefaultLayout

The default layout meant for the public facing parts of the site.

class town6.layout.ImageFileCollectionLayout(model: Any, request: onegov.town6.request.TownRequest)[source]

Bases: DefaultLayout

The default layout meant for the public facing parts of the site.

class town6.layout.ExternalLinkLayout(model: Any, request: onegov.org.request.OrgRequest, edit_mode: bool = False)[source]

Bases: onegov.org.layout.ExternalLinkLayout, DefaultLayout

The default layout meant for the public facing parts of the site.

app: onegov.town6.app.TownApp[source]

Returns the application behind the request.

request: onegov.town6.request.TownRequest[source]
class town6.layout.HomepageLayout(model: Any, request: onegov.org.request.OrgRequest, edit_mode: bool = False)[source]

Bases: onegov.org.layout.HomepageLayout, DefaultLayout

The default layout meant for the public facing parts of the site.

app: onegov.town6.app.TownApp[source]

Returns the application behind the request.

request: onegov.town6.request.TownRequest[source]
class town6.layout.ChatLayout(model: Any, request: onegov.town6.request.TownRequest)[source]

Bases: DefaultLayout

The default layout meant for the public facing parts of the site.

make_websocket_token() str[source]

A user (authenticated or anonymous) attempts to create a chat connection. For the connection to succeed, they must present a one-time token to the WebSocket server.

TODO: Add lifespan to the token?

class town6.layout.StaffChatLayout(model: Any, request: onegov.town6.request.TownRequest)[source]

Bases: ChatLayout

The default layout meant for the public facing parts of the site.

property breadcrumbs: list[onegov.core.elements.Link][source]

Returns the breadcrumbs for the current page.

class town6.layout.ClientChatLayout(model: Any, request: onegov.town6.request.TownRequest)[source]

Bases: ChatLayout

The default layout meant for the public facing parts of the site.

class town6.layout.ChatInitiationFormLayout(model: Any, request: onegov.org.request.OrgRequest, edit_mode: bool = False)[source]

Bases: DefaultLayout

The default layout meant for the public facing parts of the site.

class town6.layout.ArchivedChatsLayout(model: Any, request: onegov.org.request.OrgRequest, edit_mode: bool = False)[source]

Bases: DefaultLayout

The default layout meant for the public facing parts of the site.

property breadcrumbs: list[onegov.core.elements.Link][source]

Returns the breadcrumbs for the current page.