#NEWLINE# def render( self , context ) : #NEWLINE# #INDENT# indent_level = self . indent_level . resolve ( context ) #NEWLINE# if self . if_statement : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# if_statement = bool ( self . if_statement . resolve ( context ) ) #NEWLINE# #UNINDENT# except template . VariableDoesNotExist : #NEWLINE# #INDENT# if_statement = False #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if_statement = True #NEWLINE# #UNINDENT# output = self . nodelist . render ( context ) #NEWLINE# if if_statement : #NEWLINE# #INDENT# indent = ( ' ' * output ) #NEWLINE# output = ( indent + indent . join ( output . splitlines ( True ) ) ) #NEWLINE# #UNINDENT# return output