From f4b582134eca86250ea33e7289daaf74846dd1d0 Mon Sep 17 00:00:00 2001 From: SKairinos Date: Fri, 15 Dec 2023 15:01:07 +0000 Subject: [PATCH] add middle_name --- .../user/migrations/0002_user_middle_name.py | 18 ++++++++++++++++++ codeforlife/user/models/user.py | 7 +++++++ 2 files changed, 25 insertions(+) create mode 100644 codeforlife/user/migrations/0002_user_middle_name.py diff --git a/codeforlife/user/migrations/0002_user_middle_name.py b/codeforlife/user/migrations/0002_user_middle_name.py new file mode 100644 index 00000000..268af476 --- /dev/null +++ b/codeforlife/user/migrations/0002_user_middle_name.py @@ -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'), + ), + ] diff --git a/codeforlife/user/models/user.py b/codeforlife/user/models/user.py index f519fccf..10c950e3 100644 --- a/codeforlife/user/models/user.py +++ b/codeforlife/user/models/user.py @@ -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,