#NEWLINE# def update_account( self , form ) : #NEWLINE# #INDENT# fields = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# if ( 'timezone' in form . cleaned_data ) : #NEWLINE# #INDENT# fields [ 'timezone' ] = form . cleaned_data [ 'timezone' ] #NEWLINE# #UNINDENT# if ( 'language' in form . cleaned_data ) : #NEWLINE# #INDENT# fields [ 'language' ] = form . cleaned_data [ 'language' ] #NEWLINE# #UNINDENT# if fields : #NEWLINE# #INDENT# account = self . request . user . account #NEWLINE# for ( k , v ) in fields . items ( ) : #NEWLINE# #INDENT# setattr ( account , k , v ) #NEWLINE# #UNINDENT# account . save ( )