#NEWLINE# def _remove_none( self , data ) : #NEWLINE# #INDENT# '\n            Remove all items from a nested dictionary whose value is None.\n        ' #NEWLINE# for ( key , value ) in data . items ( ) : #NEWLINE# #INDENT# if ( ( value is None ) or isinstance ( value , forms . Field ) ) : #NEWLINE# #INDENT# del data [ key ] #NEWLINE# #UNINDENT# if isinstance ( value , dict ) : #NEWLINE# #INDENT# self . _remove_none ( data [ key ] )