Skip to content

Commit

Permalink
Merge pull request #773 from Studio-Yandex-Practicum/feature/allow-em…
Browse files Browse the repository at this point in the history
…pty-city-and-phone-in-participation-application

Make city and phone optional
  • Loading branch information
AntonZelinsky authored Apr 27, 2024
2 parents 8aaff87 + e2d9614 commit 5156d5b
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
24 changes: 24 additions & 0 deletions apps/feedback/migrations/0008_auto_20240427_0051.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Generated by Django 3.2.25 on 2024-04-26 21:51

from django.db import migrations, models
import phonenumber_field.modelfields


class Migration(migrations.Migration):

dependencies = [
('feedback', '0007_participationapplicationfestival_nickname'),
]

operations = [
migrations.AlterField(
model_name='participationapplicationfestival',
name='city',
field=models.CharField(blank=True, max_length=50, null=True, verbose_name='Город проживания'),
),
migrations.AlterField(
model_name='participationapplicationfestival',
name='phone_number',
field=phonenumber_field.modelfields.PhoneNumberField(blank=True, help_text='Номер телефона указывается в формате +7', max_length=128, null=True, region=None, verbose_name='Номер телефона'),
),
]
4 changes: 4 additions & 0 deletions apps/feedback/models/participation_application.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,13 @@ class ParticipationApplicationFestival(BaseModel):
city = models.CharField(
max_length=50,
verbose_name="Город проживания",
null=True,
blank=True,
)
phone_number = PhoneNumberField(
verbose_name="Номер телефона",
null=True,
blank=True,
help_text="Номер телефона указывается в формате +7",
)
email = models.EmailField(
Expand Down

0 comments on commit 5156d5b

Please sign in to comment.