From 379a7c1c3cd4c46f69ecf1bfbda591384032dda2 Mon Sep 17 00:00:00 2001 From: gzbender Date: Wed, 2 Oct 2019 19:07:57 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A0=D0=B5=D0=B3=D0=B8=D1=81=D1=82=D1=80?= =?UTF-8?q?=D0=B0=D1=86=D0=B8=D1=8F=20=D0=BD=D0=BE=D0=B2=D1=8B=D1=85=20?= =?UTF-8?q?=D0=BF=D0=BE=D0=BB=D1=8C=D0=B7=D0=BE=D0=B2=D0=B0=D1=82=D0=B5?= =?UTF-8?q?=D0=BB=D0=B5=D0=B9=20=D0=B2=20=D0=B2=D0=BE=D1=80=D0=BE=D0=BD?= =?UTF-8?q?=D0=BA=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/auth/views.py | 2 +- .../migrations/0035_auto_20191002_1857.py | 19 +++++++++++++++++++ apps/user/models.py | 1 + 3 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 apps/user/migrations/0035_auto_20191002_1857.py diff --git a/apps/auth/views.py b/apps/auth/views.py index 1618b231..f670d883 100644 --- a/apps/auth/views.py +++ b/apps/auth/views.py @@ -261,7 +261,7 @@ class LandingRegistrationView(View): user = User( username=email, email=email, - phone=phone, + phone2=phone, ) user.first_name = name[0] if len(name) > 1: diff --git a/apps/user/migrations/0035_auto_20191002_1857.py b/apps/user/migrations/0035_auto_20191002_1857.py new file mode 100644 index 00000000..150ffa23 --- /dev/null +++ b/apps/user/migrations/0035_auto_20191002_1857.py @@ -0,0 +1,19 @@ +# Generated by Django 2.0.7 on 2019-10-02 18:57 + +from django.db import migrations, models +import project.utils.db + + +class Migration(migrations.Migration): + + dependencies = [ + ('user', '0034_auto_20190612_1852'), + ] + + operations = [ + migrations.AddField( + model_name='user', + name='phone2', + field=models.CharField(blank=True, max_length=20, null=True), + ), + ] diff --git a/apps/user/models.py b/apps/user/models.py index f12a2755..e442ed71 100644 --- a/apps/user/models.py +++ b/apps/user/models.py @@ -59,6 +59,7 @@ class User(AbstractUser): ) email = models.EmailField(_('email address'), unique=True) phone = PhoneNumberField(null=True, blank=True, unique=True) + phone2 = models.CharField(max_length=20, null=True, blank=True) role = models.PositiveSmallIntegerField( 'Роль', default=0, choices=ROLE_CHOICES) gender = models.CharField(