1 | -from django.contrib.auth.models import AbstractBaseUser, BaseUserManager, Group
|
---|
2 | +from django.contrib.auth.models import AbstractBaseUser, BaseUserManager, Group, PermissionsMixin
|
---|
3 | from django.core import mail, validators
|
---|
4 | from django.conf import settings
|
---|
5 | from django.core.urlresolvers import reverse
|
---|
6 |
|
---|
7 | -class User(AbstractBaseUser):
|
---|
8 | +class User(PermissionsMixin, AbstractBaseUser):
|
---|
9 | username = models.CharField(...)
|
---|
10 | displayname = models.CharField(max_length=150, blank=True)
|
---|
11 | email = models.EmailField()
|
---|
12 | - groups = models.ManyToManyField(Group)
|
---|
13 | banned = models.BooleanField(default=False)
|
---|
14 | active = models.BooleanField(default=True)
|
---|
15 | date_joined = models.DateField(auto_now_add=True)
|
---|