This commit is contained in:
2026-03-20 23:16:53 +03:30
parent 4c5b1298a0
commit a98189a7e9
20 changed files with 855 additions and 76 deletions
+19
View File
@@ -0,0 +1,19 @@
from django.contrib.auth.models import AbstractUser
from django.db import models
class User(AbstractUser):
phone_number = models.CharField(
max_length=32,
unique=True,
db_index=True,
)
USERNAME_FIELD = "phone_number"
REQUIRED_FIELDS = ["username"]
class Meta:
db_table = "users"
def __str__(self):
return self.phone_number