feriennet.sponsors

Classes

Sponsor

Functions

load_sponsors(→ list[Sponsor])

Package Contents

feriennet.sponsors.load_sponsors(sponsors_path: str) list[Sponsor][source]
class feriennet.sponsors.Sponsor(**kwargs: Any)[source]
__slots__ = ('name', 'logo', 'logo_url', 'mail_url', 'background', 'height', 'width', 'top', 'banners')[source]
banners: dict[str, str][source]
url_for(request: onegov.feriennet.request.FeriennetRequest, path: str) str[source]
compiled(request: onegov.feriennet.request.FeriennetRequest, data: None = None) Self[source]
compiled(request: onegov.feriennet.request.FeriennetRequest, data: dict[str, Any]) dict[str, Any]

Returns an instance of the sponsor with all data localized and all variables replaced with the related values.

This turns the following sponsor:

url:
    de: Ja {timestamp}
    fr: Oui {timestamp}
    it: Si {timestamp}

Into this:

url: Ja