#NEWLINE# def create_response( self , request , data , response_class = HttpResponse , **response_kwargs ) : #NEWLINE# #INDENT# 'On posting a run, return a url to the MozTrap UI for that new run.' #NEWLINE# resp = super ( RunResource , self ) . create_response ( request , data , response_class = self , ** response_kwargs ) #NEWLINE# if isinstance ( data , Bundle ) : #NEWLINE# #INDENT# full_url = filter_url ( 'results_runcaseversions' , Run . objects . get ( pk = data . data [ 'id' ] ) ) #NEWLINE# new_content = json . loads ( resp . content ) #NEWLINE# new_content [ 'ui_uri' ] = full_url #NEWLINE# new_content [ 'resource_uri' ] = data . data [ 'resource_uri' ] #NEWLINE# resp . content = json . dumps ( new_content ) #NEWLINE# resp . _headers [ 'content-type' ] = ( 'Content-Type' , 'application/json; charset=utf-8' ) #NEWLINE# #UNINDENT# return resp