#NEWLINE# def save( self , commit = True ) : #NEWLINE# #INDENT# user = self . user #NEWLINE# if ( self . cleaned_data [ 'email' ] != None ) : #NEWLINE# #INDENT# if ( user . email != self . cleaned_data [ 'email' ] ) : #NEWLINE# #INDENT# g = Group . objects . get ( name = 'Valid Email' ) #NEWLINE# user . groups . remove ( g ) #NEWLINE# #UNINDENT# user . email = self . cleaned_data [ 'email' ] #NEWLINE# #UNINDENT# user . username = self . cleaned_data [ 'username' ] #NEWLINE# self . userprofile . gender = self . cleaned_data [ 'gender' ] #NEWLINE# self . userprofile . public_profile = self . cleaned_data [ 'public_profile' ] #NEWLINE# self . userprofile . description = self . cleaned_data [ 'description' ] #NEWLINE# self . userprofile . email_notification = self . cleaned_data [ 'email_notification' ] #NEWLINE# self . userprofile . party = self . cleaned_data [ 'party' ] #NEWLINE# if commit : #NEWLINE# #INDENT# user . save ( ) #NEWLINE# self . userprofile . save ( ) #NEWLINE# #UNINDENT# return user