onadata.libs.serializers.fields package¶
Submodules¶
onadata.libs.serializers.fields.hyperlinked_multi_identity_field module¶
The HyperlinkedIdentityField class - multi-lookup identity fields.
- class onadata.libs.serializers.fields.hyperlinked_multi_identity_field.HyperlinkedMultiIdentityField(*args, **kwargs)¶
Bases:
HyperlinkedIdentityField
The HyperlinkedIdentityField class - multi-lookup identity fields.
- get_url(obj, view_name, request, format)¶
Given an object, return the URL that hyperlinks to the object.
May raise a NoReverseMatch if the view_name and lookup_field attributes are not configured to correctly match the URL conf.
- lookup_fields = (('pk', 'pk'),)¶
onadata.libs.serializers.fields.json_field module¶
A string is represented as valid JSON and is accessible as a dictionary and vis-a-vis.
- class onadata.libs.serializers.fields.json_field.JsonField(*args, **kwargs)¶
Bases:
Field
Deserialize a string instance containing a JSON document to a Python object.
- to_internal_value(data)¶
Deserialize
value
a str instance containing a JSON document to a Python object.
- classmethod to_json(data)¶
Returns the JSON string as a dictionary.
- to_representation(value)¶
Deserialize
value
a str instance containing a JSON document to a Python object.
onadata.libs.serializers.fields.organization_field module¶
OrganizationField serializer field.
onadata.libs.serializers.fields.project_field module¶
ProjectField serializer field.
onadata.libs.serializers.fields.team_field module¶
The TeamField class.
onadata.libs.serializers.fields.xform_field module¶
The XFormField class