gazette.views.notice

Functions

view_notice(→ onegov.core.types.RenderData)

View a notice.

preview_notice(→ onegov.core.types.RenderData)

Preview the notice.

preview_notice_pdf(→ morepath.request.Response)

Preview the notice as PDF.

edit_notice(→ RenderData | BaseResponse)

Edit a notice.

edit_notice_unrestricted(→ RenderData | BaseResponse)

Edit a notice without restrictions.

delete_notice(→ RenderData | BaseResponse)

Delete a notice.

Module Contents

gazette.views.notice.view_notice(self: onegov.gazette.models.GazetteNotice, request: onegov.gazette.request.GazetteRequest) onegov.core.types.RenderData[source]

View a notice.

View the notice and its meta data. This is the main view for the notices to do the state changes.

gazette.views.notice.preview_notice(self: onegov.gazette.models.GazetteNotice, request: onegov.gazette.request.GazetteRequest) onegov.core.types.RenderData[source]

Preview the notice.

gazette.views.notice.preview_notice_pdf(self: onegov.gazette.models.GazetteNotice, request: onegov.gazette.request.GazetteRequest) morepath.request.Response[source]

Preview the notice as PDF.

gazette.views.notice.edit_notice(self: onegov.gazette.models.GazetteNotice, request: onegov.gazette.request.GazetteRequest, form: onegov.gazette.forms.NoticeForm) RenderData | BaseResponse[source]

Edit a notice.

This view is used by the editors and publishers. Editors may only edit their own notices, publishers may edit any notice. It’s not possible to change already accepted or published notices (although you can use the unrestricted view for this).

gazette.views.notice.edit_notice_unrestricted(self: onegov.gazette.models.GazetteNotice, request: onegov.gazette.request.GazetteRequest, form: onegov.gazette.forms.UnrestrictedNoticeForm) RenderData | BaseResponse[source]

Edit a notice without restrictions.

This view is only usable by publishers.

gazette.views.notice.delete_notice(self: onegov.gazette.models.GazetteNotice, request: onegov.gazette.request.GazetteRequest, form: onegov.gazette.forms.EmptyForm) RenderData | BaseResponse[source]

Delete a notice.

Editors may only delete their own drafted and rejected notices.

Publishers may delete any drafted, rejected and accepted notices.

Admins may delete any drafted, submitted, rejected and accepted notices.