#NEWLINE# def render( self , context ) : #NEWLINE# #INDENT# items = [ ] #NEWLINE# for item in self . items : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# var = item . resolve ( context ) #NEWLINE# if isinstance ( var , dict ) : #NEWLINE# #INDENT# items . extend ( var . values ( ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if isinstance ( var , ( list , tuple ) ) : #NEWLINE# #INDENT# items . extend ( var ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# items . append ( var ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# except template . VariableDoesNotExist : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# #UNINDENT# errors = False #NEWLINE# form_list = [ ] #NEWLINE# formset_list = [ ] #NEWLINE# for i in item : #NEWLINE# #INDENT# if isinstance ( i , forms . BaseForm ) : #NEWLINE# #INDENT# form_list . append ( i ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# formset_list . append ( i ) #NEWLINE# #UNINDENT# if ( getattr ( i , 'errors' , None ) or getattr ( i , 'non_field_errors' , ( lambda : None ) ) ( ) ) : #NEWLINE# #INDENT# errors = True #NEWLINE# #UNINDENT# #UNINDENT# if ( not errors ) : #NEWLINE# #INDENT# return '' #NEWLINE# #UNINDENT# return render_to_string ( '_form_errors.html' , { #NEWLINE# #INDENT# 'forms' : form_list , #NEWLINE# 'formsets' : formset_list , #NEWLINE# 'errors' : True , #NEWLINE# #UNINDENT# } )