onadata.apps.api.viewsets.xform_submission_viewset module¶
Module contents¶
XFormSubmissionViewSet module
- class onadata.apps.api.viewsets.xform_submission_viewset.FLOIPParser¶
Bases:
JSONParser
Flow Results JSON parser.
- media_type = 'application/vnd.org.flowinterop.results+json'¶
- renderer_classes¶
alias of
FLOIPRenderer
- class onadata.apps.api.viewsets.xform_submission_viewset.XFormSubmissionViewSet(**kwargs)¶
Bases:
AuthenticateHeaderMixin
,OpenRosaHeadersMixin
,CreateModelMixin
,DefaultBaseViewset
,GenericViewSet
XFormSubmissionViewSet class
- authentication_classes = (<class 'onadata.libs.authentication.DigestAuthentication'>, <class 'rest_framework.authentication.BasicAuthentication'>, <class 'rest_framework.authentication.TokenAuthentication'>, <class 'onadata.libs.authentication.EnketoTokenAuthentication'>)¶
- create(request, *args, **kwargs)¶
- filter_backends = (<class 'onadata.libs.filters.AnonDjangoObjectPermissionFilter'>,)¶
- get_serializer(*args, **kwargs)¶
Pass many=True flag if data is a list.
- get_serializer_class()¶
Returns the serializer class to be used based on content_type.
- handle_exception(exc)¶
Handles exceptions thrown by handler method and returns appropriate error response.
- parser_classes = (<class 'onadata.apps.api.viewsets.xform_submission_viewset.FLOIPParser'>, <class 'rest_framework.parsers.JSONParser'>, <class 'rest_framework.parsers.FormParser'>, <class 'rest_framework.parsers.MultiPartParser'>)¶
- permission_classes = (<class 'rest_framework.permissions.AllowAny'>, <class 'onadata.apps.api.permissions.IsAuthenticatedSubmission'>)¶
- renderer_classes = (<class 'onadata.libs.renderers.renderers.TemplateXMLRenderer'>, <class 'rest_framework.renderers.JSONRenderer'>, <class 'rest_framework.renderers.BrowsableAPIRenderer'>, <class 'onadata.libs.renderers.renderers.FLOIPRenderer'>)¶
- serializer_class¶
alias of
SubmissionSerializer
- template_name = 'submission.xml'¶
- throttle_scope = 'submission'¶