SHARE
TWEET

Untitled

a guest Aug 15th, 2018 93 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class User(AbstractUser):
  2.     username = None
  3.     email = models.EmailField(_('email address'), unique=True)
  4.    
  5.     # this is the magic!
  6.     is_active = models.BooleanField(default=False)
  7.  
  8.     USERNAME_FIELD = 'email'
  9.     REQUIRED_FIELDS = []
  10.  
  11.     objects = UserManager()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top