| Trees | Indices | Help |
|---|
|
|
|
|||
|
|||
|
|||
|
Inherited from Inherited from Inherited from Inherited from |
|||
|
|||
|
Inherited from Inherited from |
|||
|
|||
|
Inherited from Inherited from |
|||
|
|||
Serializes ``value`` to a basic Python datatype. Noop by default. Concrete :class:`Field` classes should implement this method. Example: :
class TitleCase(Field):
def _serialize(self, value, attr, obj):
if not value:
return ''
return unicode(value).title()
:param value: The value to be serialized. :param str attr: The attribute or key on the object to be serialized. :param object obj: The object the value was pulled from. :raise ValidationError: In case of formatting or validation failure.
|
Deserialize value. Concrete :class:`Field` classes should implement this method. :raise ValidationError: In case of formatting or validation failure.
|
| Trees | Indices | Help |
|---|
| Generated by Epydoc 3.0.1 on Mon Sep 12 06:06:13 2016 | http://epydoc.sourceforge.net |