#NEWLINE# def external_export_response( export ) : #NEWLINE# #INDENT# if ( isinstance ( export , Export ) and ( export . internal_status == Export . SUCCESSFUL ) ) : #NEWLINE# #INDENT# return HttpResponseRedirect ( export . export_url ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# http_status = status . HTTP_400_BAD_REQUEST #NEWLINE# #UNINDENT# return Response ( json . dumps ( export ) , export , content_type = 'application/json' )