#NEWLINE# def clean_email( self ) : #NEWLINE# #INDENT# '\n        Set a nicer error message than the ORM.\n        ' #NEWLINE# email = self . cleaned_data [ 'email' ] #NEWLINE# try : #NEWLINE# #INDENT# get_user_model ( ) . _default_manager . get ( email = email ) #NEWLINE# #UNINDENT# except get_user_model ( ) . DoesNotExist : #NEWLINE# #INDENT# return email #NEWLINE# #UNINDENT# raise forms . ValidationError ( self . error_messages [ 'duplicate_email' ] )