#NEWLINE# def clean_username( self ) : #NEWLINE# #INDENT# username = self . cleaned_data [ 'username' ] #NEWLINE# is_taken = User . objects . filter ( username = username ) . exists ( ) #NEWLINE# if is_taken : #NEWLINE# #INDENT# raise forms . ValidationError ( _ ( 'The username is taken.' ) ) #NEWLINE# #UNINDENT# return username