Skip to content

Commit

Permalink
fix: custom user
Browse files Browse the repository at this point in the history
  • Loading branch information
Shavkatjon-O committed Aug 22, 2024
1 parent 15076c8 commit 31d7c71
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
17 changes: 17 additions & 0 deletions apps/users/migrations/0002_remove_user_full_name.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Generated by Django 5.0.7 on 2024-08-22 13:44

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
('users', '0001_initial'),
]

operations = [
migrations.RemoveField(
model_name='user',
name='full_name',
),
]
1 change: 0 additions & 1 deletion apps/users/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ class User(AbstractUser, BaseModel):
last_name = None

email = models.EmailField(unique=True)
full_name = models.CharField(max_length=256)

REQUIRED_FIELDS = []
USERNAME_FIELD = "email"
Expand Down
1 change: 1 addition & 0 deletions apps/users/serializers.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from rest_framework import serializers
from django.contrib.auth import get_user_model


User = get_user_model()


Expand Down

0 comments on commit 31d7c71

Please sign in to comment.