apis_core.generic.utils.models#
Module Contents#
Classes#
A pydantic BaseModel that provides a class method to turn pydantic validation errors into strings, usable by Django to pass on to an Error for example. |
|
Pydantic based valdiation model for the config class used in the GenericModel |
API#
- class apis_core.generic.utils.models.ValidationModel(/, **data: Any)[source]#
Bases:
pydantic.BaseModelA pydantic BaseModel that provides a class method to turn pydantic validation errors into strings, usable by Django to pass on to an Error for example.
Initialization
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- class apis_core.generic.utils.models.ConfigModel(/, **data: Any)[source]#
Bases:
apis_core.generic.utils.models.ValidationModelPydantic based valdiation model for the config class used in the GenericModel
Initialization
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- model_config = 'ConfigDict(...)'#
- overview_section: Optional[Union[str, django.utils.functional.Promise]] = None#