a guest Aug 15th, 2018 93 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- class User(AbstractUser):
- username = None
- email = models.EmailField(_('email address'), unique=True)
- # this is the magic!
- is_active = models.BooleanField(default=False)
- USERNAME_FIELD = 'email'
- REQUIRED_FIELDS = 
- objects = UserManager()
RAW Paste Data