Problems with user authentication
from django.db import models
from rest_framework.exceptions import ValidationError
from django.contrib.auth.models import AbstractUser
# Модель юзера
class CustomUser(AbstractUser):
STATUS_CHOICES_TYPE = [
('Заказчик', 'Заказчик'),
('Сотрудник', 'Сотрудник')
]
full_name = models.CharField(max_length=50, null=False, verbose_name='ФИО')
telephone = models.CharField(max_length=20, null=False, verbose_name='Номер телефона')
photo = models.ImageField(upload_to="users/%Y/%m/%d/", null=False, verbose_name='Фотография')
type = models.CharField(max_length=11, choices=STATUS_CHOICES_TYPE, default='Заказчик',
verbose_name='Тип пользователя')
The user has been added to the database, but cannot log into the admin panel. The console gives an error, superuser everything is fine