mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2025-06-21 11:18:27 +02:00
Ask gender
This commit is contained in:
@ -100,7 +100,7 @@ class StudentRegistrationForm(forms.ModelForm):
|
||||
"""
|
||||
class Meta:
|
||||
model = StudentRegistration
|
||||
fields = ('team', 'student_class', 'birth_date', 'address', 'phone_number',
|
||||
fields = ('team', 'student_class', 'birth_date', 'gender', 'address', 'phone_number',
|
||||
'school', 'responsible_name', 'responsible_phone', 'responsible_email',
|
||||
'give_contact_to_animath', 'email_confirmed',)
|
||||
|
||||
@ -177,7 +177,7 @@ class CoachRegistrationForm(forms.ModelForm):
|
||||
"""
|
||||
class Meta:
|
||||
model = CoachRegistration
|
||||
fields = ('team', 'birth_date', 'address', 'phone_number', 'professional_activity',
|
||||
fields = ('team', 'birth_date', 'gender', 'address', 'phone_number', 'professional_activity',
|
||||
'give_contact_to_animath', 'email_confirmed',)
|
||||
|
||||
|
||||
|
@ -0,0 +1,18 @@
|
||||
# Generated by Django 3.0.11 on 2021-01-22 07:42
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('registration', '0001_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='participantregistration',
|
||||
name='gender',
|
||||
field=models.DateField(choices=[('female', 'Female'), ('male', 'Male'), ('other', 'Other')], default='other', verbose_name='gender'),
|
||||
),
|
||||
]
|
@ -128,6 +128,16 @@ class ParticipantRegistration(Registration):
|
||||
default=date.today,
|
||||
)
|
||||
|
||||
gender = models.DateField(
|
||||
verbose_name=_("gender"),
|
||||
choices=[
|
||||
("female", _("Female")),
|
||||
("male", _("Male")),
|
||||
("other", _("Other")),
|
||||
],
|
||||
default="other",
|
||||
)
|
||||
|
||||
address = AddressField(
|
||||
verbose_name=_("address"),
|
||||
null=True,
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
<dt class="col-sm-6 text-right">{% trans "First name:" %}</dt>
|
||||
<dd class="col-sm-6">{{ user_object.first_name }}</dd>
|
||||
|
||||
StudentRegistrationForm(
|
||||
<dt class="col-sm-6 text-right">{% trans "Email:" %}</dt>
|
||||
<dd class="col-sm-6"><a href="mailto:{{ user_object.email }}">{{ user_object.email }}</a>
|
||||
{% if not user_object.registration.email_confirmed %} (<em>{% trans "Not confirmed" %}, <a href="{% url "registration:email_validation_resend" pk=user_object.pk %}">{% trans "resend the validation link" %}</a></em>){% endif %}</dd>
|
||||
@ -42,6 +42,9 @@
|
||||
<dt class="col-sm-6 text-right">{% trans "Birth date:" %}</dt>
|
||||
<dd class="col-sm-6">{{ user_object.registration.birth_date }}</dd>
|
||||
|
||||
<dt class="col-sm-6 text-right">{% trans "Gender:" %}</dt>
|
||||
<dd class="col-sm-6">{{ user_object.registration.get_gender_display }}</dd>
|
||||
|
||||
<dt class="col-sm-6 text-right">{% trans "Address:" %}</dt>
|
||||
<dd class="col-sm-6">{{ user_object.registration.address }}</dd>
|
||||
|
||||
|
Reference in New Issue
Block a user