election_day.layouts.mail

Classes

MailLayout

A special layout for creating HTML E-Mails.

Module Contents

class election_day.layouts.mail.MailLayout(model: Any, request: onegov.election_day.request.ElectionDayRequest)[source]

Bases: onegov.election_day.layouts.default.DefaultLayout

A special layout for creating HTML E-Mails.

property base: chameleon.PageTemplateFile[source]

Returns the layout, which defines the base layout of all pages.

See templates/layout.pt.

property primary_color: str[source]
model_title(model: Election | ElectionCompound | Vote) str | None[source]

Returns the translated title of the given election or vote. Falls back to the title of the default fallback, if no translated title is available.

model_url(model: object) str[source]

Returns the localized link to the given election of vote.

subject(model: Election | ElectionCompound | Vote) str[source]

Returns a nice subject for the given model.

Returns the opt-out link of the principal.