Skip to content

Commit

Permalink
add middle_name
Browse files Browse the repository at this point in the history
  • Loading branch information
SKairinos committed Dec 15, 2023
1 parent 9b9fa18 commit f4b5821
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
18 changes: 18 additions & 0 deletions codeforlife/user/migrations/0002_user_middle_name.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 3.2.20 on 2023-12-15 15:00

from django.db import migrations, models


class Migration(migrations.Migration):

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

operations = [
migrations.AddField(
model_name='user',
name='middle_name',
field=models.CharField(blank=True, max_length=150, null=True, verbose_name='middle name'),
),
]
7 changes: 7 additions & 0 deletions codeforlife/user/models/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,13 @@ def create_superuser(self, password: str, first_name: str, **fields):
blank=True,
)

middle_name = models.CharField(
_("middle name"),
max_length=150,
null=True,
blank=True,
)

email = models.EmailField(
_("email address"),
unique=True,
Expand Down

0 comments on commit f4b5821

Please sign in to comment.