def create_response(self, request, data, response_class=HttpResponse, **response_kwargs): data['domain'] = request.domain data['config_id'] = self.config_id data['api_path'] = request.path data['table_id'] = self.table_id response = super(BaseODataResource, self).create_response( request, data, response_class, **response_kwargs) return add_odata_headers(response)
def create_response(self, request, data, response_class=HttpResponse, **response_kwargs): # populate the domain which is required by the serializer data['domain'] = request.domain data['case_type'] = self.case_type data['api_path'] = request.path response = super(ODataCommCareCaseResource, self).create_response(request, data, response_class, **response_kwargs) # adds required odata headers to the returned response return add_odata_headers(response)
def create_response(self, request, data, response_class=HttpResponse, **response_kwargs): data['domain'] = request.domain data['app_id'] = self.app_id data['xmlns'] = self.xmlns data['api_path'] = request.path response = super(DeprecatedODataFormResource, self).create_response(request, data, response_class, **response_kwargs) return add_odata_headers(response)