mirror of
https://github.com/MarcZierle/photo-log-backend.git
synced 2025-01-01 12:27:58 +00:00
19 lines
435 B
Python
19 lines
435 B
Python
|
from django.contrib.auth.models import AbstractUser
|
||
|
from django.db import models
|
||
|
from django.utils.translation import ugettext_lazy as _
|
||
|
|
||
|
from .managers import CustomUserManager
|
||
|
|
||
|
|
||
|
class CustomUser(AbstractUser):
|
||
|
username = None
|
||
|
email = models.EmailField(_('email address'), unique=True)
|
||
|
|
||
|
USERNAME_FIELD = 'email'
|
||
|
REQUIRED_FIELDS = []
|
||
|
|
||
|
objects = CustomUserManager()
|
||
|
|
||
|
def __str__(self):
|
||
|
return self.email
|