#NEWLINE# def clean_username( self ) : #NEWLINE# #INDENT# if up_settings . EMAIL_ONLY : #NEWLINE# #INDENT# username = self . _generate_username ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# username = self . cleaned_data [ 'username' ] #NEWLINE# if User . objects . filter ( username__iexact = username ) : #NEWLINE# #INDENT# raise forms . ValidationError ( _ ( 'A user with that username already exists.' ) ) #NEWLINE# #UNINDENT# #UNINDENT# return username