#NEWLINE# @ method_decorator ( login_possibly_required ) #NEWLINE# @ method_decorator ( permissions_possibly_required ) #NEWLINE# def get( self , request , request_id ) : #NEWLINE# #INDENT# silk_request = Request . objects . get ( pk = request_id ) #NEWLINE# query_params = None #NEWLINE# if silk_request . query_params : #NEWLINE# #INDENT# query_params = json . loads ( silk_request . query_params ) #NEWLINE# #UNINDENT# body = silk_request . raw_body #NEWLINE# try : #NEWLINE# #INDENT# body = json . loads ( body ) #NEWLINE# #UNINDENT# except ( ValueError , TypeError ) : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# context = { #NEWLINE# #INDENT# 'silk_request' : silk_request , #NEWLINE# 'curl' : curl_cmd ( url = request . build_absolute_uri ( silk_request . path ) , method = silk_request . method , query_params = query_params , body = body , content_type = silk_request . content_type ) , #NEWLINE# 'query_params' : ( json . dumps ( query_params , sort_keys = True , indent = 4 ) if query_params else None ) , #NEWLINE# 'client' : gen ( path = silk_request . path , method = silk_request . method , query_params = query_params , data = silk_request , content_type = silk_request . content_type ) , #NEWLINE# 'request' : request , #NEWLINE# #UNINDENT# } #NEWLINE# return render_to_response ( 'silk/request.html' , context )