restapi.models.fields.DelimitedList
- class restapi.models.fields.DelimitedList(cls_or_instance, *, delimiter=None, unique=False, **kwargs)[source]
- Parameters:
cls_or_instance (
Union[Field,type])delimiter (
Optional[str], default:None)unique (
bool, default:False)kwargs (
Any)
- __init__(cls_or_instance, *, delimiter=None, unique=False, **kwargs)[source]
- Parameters:
cls_or_instance (
Union[Field,type])delimiter (
Optional[str], default:None)unique (
bool, default:False)kwargs (
Any)
- Return type:
None
Methods
__init__(cls_or_instance, *[, delimiter, unique])deserialize(value[, attr, data])Deserialize
value.fail(key, **kwargs)Helper method that raises a ValidationError with an error message from
self.error_messages.get_value(obj, attr[, accessor, default])Return the value for a given key from an object.
make_error(key, **kwargs)Helper method to make a ValidationError with an error message from
self.error_messages.serialize(attr, obj[, accessor])Pulls the value for the given key from the object, applies the field's formatting and returns the result.
Attributes
The context dictionary for the parent
Schema.Default error messages.