restapi.models.fields.Neo4jChoice
- class restapi.models.fields.Neo4jChoice(choices_model, **kwargs)[source]
Field that serializes from a neo4j choice
- Parameters:
choices_model (
Any)kwargs (
Any)
- __init__(choices_model, **kwargs)[source]
- Parameters:
choices_model (
Any)kwargs (
Any)
- Return type:
None
Methods
__init__(choices_model, **kwargs)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 for various kinds of errors.