mirror of
https://github.com/MarcZierle/photo-log-backend.git
synced 2024-12-29 10:57:58 +00:00
19 lines
435 B
Python
Executable File
19 lines
435 B
Python
Executable File
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
|