develop #4

Merged
s460930 merged 29 commits from develop into master 2020-12-07 15:22:26 +01:00
5 changed files with 21 additions and 4 deletions
Showing only changes of commit 18957651b8 - Show all commits

Binary file not shown.

View File

@ -20,7 +20,7 @@ class UserSerializer(serializers.ModelSerializer):
class Meta:
model = UserProfile
fields = ('first_name', 'last_name', 'phone_number')
fields = ('first_name', 'last_name')
class UserRegistrationSerializer(serializers.ModelSerializer):
@ -40,8 +40,7 @@ class UserRegistrationSerializer(serializers.ModelSerializer):
UserProfile.objects.create(
user=user,
first_name=profile_data['first_name'],
last_name=profile_data['last_name'],
phone_number=profile_data['phone_number'],
last_name=profile_data['last_name']
)
return user

View File

@ -0,0 +1,19 @@
# Generated by Django 3.1.3 on 2020-12-01 21:54
from django.db import migrations
class Migration(migrations.Migration):
atomic = False
dependencies = [
('user_profile', '0001_initial'),
]
operations = [
migrations.RemoveField(
model_name='userprofile',
name='phone_number',
),
]

View File

@ -15,7 +15,6 @@ class UserProfile(models.Model):
user = models.OneToOneField(User, on_delete=models.CASCADE, related_name='profile')
first_name = models.CharField(max_length=50, unique=False)
last_name = models.CharField(max_length=50, unique=False)
phone_number = models.CharField(max_length=10, unique=False, null=True, blank=True)
class Meta:
"""