from .model import model from .proxy import proxy from .single_set_proxy import single_set_proxy from .single_set_model import single_set_model from .field_generator import field_generator from .validators import validators from .single_set_manager import single_set_manager from .constants import constants class category(single_set_model): """ This class represents single category of items in application. Category must be an strincg, where all letters are small, Category name can also contains numbers, and "-", "_". Fields ------- content : str Content of the category. Methods ------- get_proxy : class Return proxy for that model. """ content = field_generator.name() def _single_validator(self) -> callable: return validators.name class category_manager( single_set_manager, target_model = category, related_models = constants.get_related_name("item") ): """ This is manager for categories in app. It base on single set proxu, and for more informations, how to use it, see single_set_manager. """ pass