Ad like uchun apilar chiqarildi
This commit is contained in:
@@ -3,6 +3,7 @@ from django.db import models
|
||||
|
||||
from ..choices import RoleChoice, AccountType
|
||||
from ..managers import UserManager
|
||||
from model_bakery import baker
|
||||
|
||||
|
||||
class User(auth_models.AbstractUser):
|
||||
@@ -22,5 +23,9 @@ class User(auth_models.AbstractUser):
|
||||
USERNAME_FIELD = "phone"
|
||||
objects = UserManager()
|
||||
|
||||
@classmethod
|
||||
def _baker(cls):
|
||||
return baker.make(cls)
|
||||
|
||||
def __str__(self):
|
||||
return self.phone
|
||||
|
||||
Reference in New Issue
Block a user