gazette.views.notice ==================== .. py:module:: gazette.views.notice Functions --------- .. autoapisummary:: gazette.views.notice.view_notice gazette.views.notice.preview_notice gazette.views.notice.preview_notice_pdf gazette.views.notice.edit_notice gazette.views.notice.edit_notice_unrestricted gazette.views.notice.delete_notice Module Contents --------------- .. py:function:: view_notice(self: onegov.gazette.models.GazetteNotice, request: onegov.gazette.request.GazetteRequest) -> onegov.core.types.RenderData View a notice. View the notice and its meta data. This is the main view for the notices to do the state changes. .. py:function:: preview_notice(self: onegov.gazette.models.GazetteNotice, request: onegov.gazette.request.GazetteRequest) -> onegov.core.types.RenderData Preview the notice. .. py:function:: preview_notice_pdf(self: onegov.gazette.models.GazetteNotice, request: onegov.gazette.request.GazetteRequest) -> morepath.request.Response Preview the notice as PDF. .. py:function:: edit_notice(self: onegov.gazette.models.GazetteNotice, request: onegov.gazette.request.GazetteRequest, form: onegov.gazette.forms.NoticeForm) -> onegov.core.types.RenderData | webob.Response 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). .. py:function:: edit_notice_unrestricted(self: onegov.gazette.models.GazetteNotice, request: onegov.gazette.request.GazetteRequest, form: onegov.gazette.forms.UnrestrictedNoticeForm) -> onegov.core.types.RenderData | webob.Response Edit a notice without restrictions. This view is only usable by publishers. .. py:function:: delete_notice(self: onegov.gazette.models.GazetteNotice, request: onegov.gazette.request.GazetteRequest, form: onegov.gazette.forms.EmptyForm) -> onegov.core.types.RenderData | webob.Response 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.