swissvotes.layouts.page

Classes

Slide

PageLayout

Extends the base layout class with methods related to chameleon

AddPageLayout

Extends the base layout class with methods related to chameleon

PageDetailLayout

Extends the base layout class with methods related to chameleon

EditPageLayout

Extends the base layout class with methods related to chameleon

DeletePageLayout

Extends the base layout class with methods related to chameleon

ManagePageAttachmentsLayout

Extends the base layout class with methods related to chameleon

ManagePageSliderImagesLayout

Extends the base layout class with methods related to chameleon

DeletePageAttachmentLayout

Extends the base layout class with methods related to chameleon

Module Contents

class swissvotes.layouts.page.Slide[source]

Bases: NamedTuple

image: str[source]
label: str[source]
url: str[source]
class swissvotes.layouts.page.PageLayout(model: Any, request: onegov.swissvotes.request.SwissvotesRequest)[source]

Bases: onegov.swissvotes.layouts.default.DefaultLayout

Extends the base layout class with methods related to chameleon template rendering.

This class assumes the existance of two templates:

  • layout.pt -> Contains the page skeleton with headers, body and so on.

  • macros.pt -> Contains chameleon macros.

model: onegov.swissvotes.models.TranslatablePage[source]
property title: str[source]
property breadcrumbs: list[onegov.core.elements.Link][source]
get_file_url(file: onegov.swissvotes.models.TranslatablePageFile) str[source]
property slides: list[Slide][source]
class swissvotes.layouts.page.AddPageLayout(model: Any, request: onegov.swissvotes.request.SwissvotesRequest)[source]

Bases: onegov.swissvotes.layouts.default.DefaultLayout

Extends the base layout class with methods related to chameleon template rendering.

This class assumes the existance of two templates:

  • layout.pt -> Contains the page skeleton with headers, body and so on.

  • macros.pt -> Contains chameleon macros.

property title: str[source]
property breadcrumbs: list[onegov.core.elements.Link][source]
class swissvotes.layouts.page.PageDetailLayout(model: Any, request: onegov.swissvotes.request.SwissvotesRequest)[source]

Bases: onegov.swissvotes.layouts.default.DefaultLayout

Extends the base layout class with methods related to chameleon template rendering.

This class assumes the existance of two templates:

  • layout.pt -> Contains the page skeleton with headers, body and so on.

  • macros.pt -> Contains chameleon macros.

model: onegov.swissvotes.models.TranslatablePage[source]
property breadcrumbs: list[onegov.core.elements.Link][source]
class swissvotes.layouts.page.EditPageLayout(model: Any, request: onegov.swissvotes.request.SwissvotesRequest)[source]

Bases: PageDetailLayout

Extends the base layout class with methods related to chameleon template rendering.

This class assumes the existance of two templates:

  • layout.pt -> Contains the page skeleton with headers, body and so on.

  • macros.pt -> Contains chameleon macros.

property title: str[source]
class swissvotes.layouts.page.DeletePageLayout(model: Any, request: onegov.swissvotes.request.SwissvotesRequest)[source]

Bases: PageDetailLayout

Extends the base layout class with methods related to chameleon template rendering.

This class assumes the existance of two templates:

  • layout.pt -> Contains the page skeleton with headers, body and so on.

  • macros.pt -> Contains chameleon macros.

property title: str[source]
class swissvotes.layouts.page.ManagePageAttachmentsLayout(model: Any, request: onegov.swissvotes.request.SwissvotesRequest)[source]

Bases: PageDetailLayout

Extends the base layout class with methods related to chameleon template rendering.

This class assumes the existance of two templates:

  • layout.pt -> Contains the page skeleton with headers, body and so on.

  • macros.pt -> Contains chameleon macros.

property title: str[source]
class swissvotes.layouts.page.ManagePageSliderImagesLayout(model: Any, request: onegov.swissvotes.request.SwissvotesRequest)[source]

Bases: PageDetailLayout

Extends the base layout class with methods related to chameleon template rendering.

This class assumes the existance of two templates:

  • layout.pt -> Contains the page skeleton with headers, body and so on.

  • macros.pt -> Contains chameleon macros.

property title: str[source]
class swissvotes.layouts.page.DeletePageAttachmentLayout(model: Any, request: onegov.swissvotes.request.SwissvotesRequest)[source]

Bases: onegov.swissvotes.layouts.default.DefaultLayout

Extends the base layout class with methods related to chameleon template rendering.

This class assumes the existance of two templates:

  • layout.pt -> Contains the page skeleton with headers, body and so on.

  • macros.pt -> Contains chameleon macros.

model: onegov.swissvotes.models.TranslatablePageFile[source]
property title: str[source]
property parent: onegov.swissvotes.models.TranslatablePage[source]
property breadcrumbs: list[onegov.core.elements.Link][source]