#NEWLINE# def render_tag( self , context , result , casestep , varname ) : #NEWLINE# #INDENT# 'Get/construct StepResult and place it in context under ``varname``' #NEWLINE# stepresult_kwargs = dict ( result = result , step = casestep ) #NEWLINE# try : #NEWLINE# #INDENT# stepresult = model . StepResult . objects . get ( ** stepresult_kwargs ) #NEWLINE# #UNINDENT# except model . StepResult . DoesNotExist : #NEWLINE# #INDENT# stepresult = model . StepResult ( ** stepresult_kwargs ) #NEWLINE# #UNINDENT# context [ varname ] = stepresult #NEWLINE# return ''