2025.09.14-18:02:28

This commit is contained in:
2025-09-14 18:02:28 +02:00
parent 565ef0cad1
commit ff37c9cd8b
32 changed files with 733 additions and 22 deletions

19
user/models.py Normal file
View File

@@ -0,0 +1,19 @@
from django.db import models
from django.contrib.auth.models import AbstractUser
from django.utils.safestring import mark_safe
from django.conf import settings
from .managers import UserProfileManager
from django.utils.translation import gettext_lazy as _
class UserProfile(AbstractUser):
email = models.EmailField(_("email address"),
max_length=255,
unique=True)
username = models.CharField(_("username"),
max_length=63,
unique=True)
USERNAME_FIELD = 'email'
REQUIRED_FIELDS = ['username']
objects = UserProfileManager()