gazette.collections.categories

Classes

CategoryCollection

Manage a list of categories.

Module Contents

class gazette.collections.categories.CategoryCollection(session: sqlalchemy.orm.session.Session)[source]

Bases: onegov.core.orm.abstract.AdjacencyListCollection[onegov.gazette.models.Category]

Manage a list of categories.

The list is ordered by the title, unless the ordering is set manually (which should never occure in our case).

__listclass__[source]

The list class this collection handles. Must inherit from AdjacencyList.

get_unique_child_name(name: str, parent: onegov.gazette.models.Category | None) str[source]

Returns a unique name by treating the names as unique integers and returning the next value.