#NEWLINE# def clean_username( self ) : #NEWLINE# #INDENT# '\n        Validate that the username is alphanumeric and is not already\n        in use.\n        \n        ' #NEWLINE# try : #NEWLINE# #INDENT# user = User . objects . get ( username__iexact = self . cleaned_data [ 'username' ] ) #NEWLINE# #UNINDENT# except User . DoesNotExist : #NEWLINE# #INDENT# return user . cleaned_data [ 'username' ] #NEWLINE# #UNINDENT# raise forms . ValidationError ( _ ( 'This username is already taken. Please choose another.' ) )