fix - overwrite useranme field in User from AbstractUser

This commit is contained in:
2025-10-29 17:09:55 +03:30
parent 005039dd54
commit 48f837b5a5
2 changed files with 10 additions and 0 deletions

View File

@@ -2,11 +2,18 @@ from django.contrib.auth.models import (
AbstractUser
)
from django.db import models
from django.utils.translation import gettext_lazy as _
from apps.core.models import BaseModel
class User(AbstractUser, BaseModel):
username = models.CharField(
max_length=150,
help_text=_(
"Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only."
),
)
mobile = models.CharField(max_length=18, null=True)
phone = models.CharField(max_length=18, null=True)
national_code = models.CharField(max_length=16, null=True)