#NEWLINE# def retrieve( self , request , * args , **kwargs ) : #NEWLINE# #INDENT# self . object = self . get_object ( ) #NEWLINE# submission_xml_root_node = self . object . get_root_node ( ) #NEWLINE# submission_xml_root_node . setAttribute ( 'instanceID' , ( 'uuid:%s' % self . object . uuid ) ) #NEWLINE# submission_xml_root_node . setAttribute ( 'submissionDate' , self . object . date_created . isoformat ( ) ) #NEWLINE# data = { #NEWLINE# #INDENT# 'submission_data' : submission_xml_root_node . toxml ( ) , #NEWLINE# 'media_files' : Attachment . objects . filter ( instance = self . object ) , #NEWLINE# 'host' : request . build_absolute_uri ( ) . replace ( request . get_full_path ( ) , '' ) , #NEWLINE# #UNINDENT# } #NEWLINE# return Response ( args , headers = self . get_openrosa_headers ( request , location = False ) , template_name = 'downloadSubmission.xml' )