This repository has been archived on 2025-03-03. You can view files and clone it, but cannot push or open issues or pull requests.
facturio/accounts/models.py

18 lines
551 B
Python

from django.contrib.auth.models import AbstractUser
from django.db import models
from django.utils.translation import gettext_lazy as _
from subjects.models import Subject
class User(AbstractUser):
REQUIRED_FIELDS = ['email', 'first_name', 'last_name']
first_name = models.CharField(_('first name'), max_length=150)
last_name = models.CharField(_('last name'), max_length=150)
email = models.EmailField(_('email address'))
subjects = models.ManyToManyField(Subject, blank=True)
class Meta(AbstractUser.Meta):
...