gazette.views.categories ======================== .. py:module:: gazette.views.categories Functions --------- .. autoapisummary:: gazette.views.categories.view_categories gazette.views.categories.create_category gazette.views.categories.edit_category gazette.views.categories.delete_category gazette.views.categories.export_categories Module Contents --------------- .. py:function:: view_categories(self: onegov.gazette.collections.CategoryCollection, request: onegov.gazette.request.GazetteRequest) -> onegov.core.types.RenderData View the list of categories. This view is only visible by an admin. .. py:function:: create_category(self: onegov.gazette.collections.CategoryCollection, request: onegov.gazette.request.GazetteRequest, form: onegov.gazette.forms.CategoryForm) -> onegov.core.types.RenderData | webob.Response Create a new category. This view is only visible by an admin. .. py:function:: edit_category(self: onegov.gazette.models.Category, request: onegov.gazette.request.GazetteRequest, form: onegov.gazette.forms.CategoryForm) -> onegov.core.types.RenderData | webob.Response Edit a category. This view is only visible by an admin. .. py:function:: delete_category(self: onegov.gazette.models.Category, request: onegov.gazette.request.GazetteRequest, form: onegov.gazette.forms.EmptyForm) -> onegov.core.types.RenderData | webob.Response Delete a category. Only unused categorys may be deleted. .. py:function:: export_categories(self: onegov.gazette.collections.CategoryCollection, request: onegov.gazette.request.GazetteRequest) -> morepath.request.Response Export all categories as XLSX. The exported file can be re-imported using the import-categories command line command.