mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2024-12-25 05:42:23 +00:00
Gender is not a date
This commit is contained in:
parent
74c0260593
commit
628f69e772
@ -1,4 +1,4 @@
|
|||||||
# Generated by Django 3.0.11 on 2021-01-22 07:42
|
# Generated by Django 3.0.11 on 2021-01-22 08:00
|
||||||
|
|
||||||
from django.db import migrations, models
|
from django.db import migrations, models
|
||||||
|
|
||||||
@ -13,6 +13,6 @@ class Migration(migrations.Migration):
|
|||||||
migrations.AddField(
|
migrations.AddField(
|
||||||
model_name='participantregistration',
|
model_name='participantregistration',
|
||||||
name='gender',
|
name='gender',
|
||||||
field=models.DateField(choices=[('female', 'Female'), ('male', 'Male'), ('other', 'Other')], default='other', verbose_name='gender'),
|
field=models.CharField(choices=[('female', 'Female'), ('male', 'Male'), ('other', 'Other')], default='other', max_length=6, verbose_name='gender'),
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
|
@ -128,7 +128,8 @@ class ParticipantRegistration(Registration):
|
|||||||
default=date.today,
|
default=date.today,
|
||||||
)
|
)
|
||||||
|
|
||||||
gender = models.DateField(
|
gender = models.CharField(
|
||||||
|
max_length=6,
|
||||||
verbose_name=_("gender"),
|
verbose_name=_("gender"),
|
||||||
choices=[
|
choices=[
|
||||||
("female", _("Female")),
|
("female", _("Female")),
|
||||||
|
@ -130,6 +130,7 @@ class TestRegistration(TestCase):
|
|||||||
student_class=12,
|
student_class=12,
|
||||||
school="God",
|
school="God",
|
||||||
birth_date="2000-01-01",
|
birth_date="2000-01-01",
|
||||||
|
gender="other",
|
||||||
address="1 Rue de Rivoli, 75001 Paris, France",
|
address="1 Rue de Rivoli, 75001 Paris, France",
|
||||||
phone_number="0123456789",
|
phone_number="0123456789",
|
||||||
responsible_name="Toto",
|
responsible_name="Toto",
|
||||||
@ -153,6 +154,7 @@ class TestRegistration(TestCase):
|
|||||||
student_class=12,
|
student_class=12,
|
||||||
school="God",
|
school="God",
|
||||||
birth_date="2000-01-01",
|
birth_date="2000-01-01",
|
||||||
|
gender="other",
|
||||||
address="1 Rue de Rivoli, 75001 Paris, France",
|
address="1 Rue de Rivoli, 75001 Paris, France",
|
||||||
phone_number="0123456789",
|
phone_number="0123456789",
|
||||||
responsible_name="Toto",
|
responsible_name="Toto",
|
||||||
@ -173,6 +175,7 @@ class TestRegistration(TestCase):
|
|||||||
password2="azertyuiopazertyuiop",
|
password2="azertyuiopazertyuiop",
|
||||||
role="coach",
|
role="coach",
|
||||||
birth_date="1980-01-01",
|
birth_date="1980-01-01",
|
||||||
|
gender="other",
|
||||||
address="1 Rue de Rivoli, 75001 Paris, France",
|
address="1 Rue de Rivoli, 75001 Paris, France",
|
||||||
phone_number="0123456789",
|
phone_number="0123456789",
|
||||||
professional_activity="God",
|
professional_activity="God",
|
||||||
@ -252,10 +255,10 @@ class TestRegistration(TestCase):
|
|||||||
|
|
||||||
for user, data in [(self.user, dict(role="Bot")),
|
for user, data in [(self.user, dict(role="Bot")),
|
||||||
(self.student, dict(student_class=11, school="Sky", birth_date="2001-01-01",
|
(self.student, dict(student_class=11, school="Sky", birth_date="2001-01-01",
|
||||||
address="1 Rue de Rivoli, 75001 Paris, France", responsible_name="Toto",
|
gender="female", address="1 Rue de Rivoli, 75001 Paris, France",
|
||||||
responsible_email="toto@example.com")),
|
responsible_name="Toto", responsible_email="toto@example.com")),
|
||||||
(self.coach, dict(professional_activity="God", birth_date="2001-01-01",
|
(self.coach, dict(professional_activity="God", birth_date="2001-01-01",
|
||||||
address="1 Rue de Rivoli, 75001 Paris, France"))]:
|
gender="male", address="1 Rue de Rivoli, 75001 Paris, France"))]:
|
||||||
response = self.client.get(reverse("registration:update_user", args=(user.pk,)))
|
response = self.client.get(reverse("registration:update_user", args=(user.pk,)))
|
||||||
self.assertEqual(response.status_code, 200)
|
self.assertEqual(response.status_code, 200)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user