fix - overwrite useranme field in User from AbstractUser
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -584,3 +584,6 @@ AssertionError: .validate() should return the validated data
|
||||
[2025-10-29 16:57:50,609] INFO django.utils.autoreload | IP: - | Path: - | D:\Project\Rasaddam_Backend\apps\authentication\api\v1\serializers\serializer.py changed, reloading.
|
||||
[2025-10-29 16:57:52,543] INFO django.utils.autoreload | IP: - | Path: - | Watching for file changes with StatReloader
|
||||
[2025-10-29 16:57:57,860] INFO django.utils.autoreload | IP: - | Path: - | D:\Project\Rasaddam_Backend\apps\authentication\api\v1\serializers\serializer.py changed, reloading.
|
||||
[2025-10-29 16:58:00,956] INFO django.utils.autoreload | IP: - | Path: - | Watching for file changes with StatReloader
|
||||
[2025-10-29 17:09:28,263] INFO django.utils.autoreload | IP: - | Path: - | D:\Project\Rasaddam_Backend\apps\authentication\models.py changed, reloading.
|
||||
[2025-10-29 17:09:30,370] INFO django.utils.autoreload | IP: - | Path: - | Watching for file changes with StatReloader
|
||||
|
||||
Reference in New Issue
Block a user