gazette.views.categories

Functions

view_categories(→ onegov.core.types.RenderData)

View the list of categories.

create_category(→ RenderData | BaseResponse)

Create a new category.

edit_category(→ RenderData | BaseResponse)

Edit a category.

delete_category(→ RenderData | BaseResponse)

Delete a category.

export_categories(→ morepath.request.Response)

Export all categories as XLSX. The exported file can be re-imported

Module Contents

gazette.views.categories.view_categories(self: onegov.gazette.collections.CategoryCollection, request: onegov.gazette.request.GazetteRequest) onegov.core.types.RenderData[source]

View the list of categories.

This view is only visible by an admin.

gazette.views.categories.create_category(self: onegov.gazette.collections.CategoryCollection, request: onegov.gazette.request.GazetteRequest, form: onegov.gazette.forms.CategoryForm) RenderData | BaseResponse[source]

Create a new category.

This view is only visible by an admin.

gazette.views.categories.edit_category(self: onegov.gazette.models.Category, request: onegov.gazette.request.GazetteRequest, form: onegov.gazette.forms.CategoryForm) RenderData | BaseResponse[source]

Edit a category.

This view is only visible by an admin.

gazette.views.categories.delete_category(self: onegov.gazette.models.Category, request: onegov.gazette.request.GazetteRequest, form: onegov.gazette.forms.EmptyForm) RenderData | BaseResponse[source]

Delete a category.

Only unused categorys may be deleted.

gazette.views.categories.export_categories(self: onegov.gazette.collections.CategoryCollection, request: onegov.gazette.request.GazetteRequest) morepath.request.Response[source]

Export all categories as XLSX. The exported file can be re-imported using the import-categories command line command.