Ask gender

This commit is contained in:
Yohann D'ANELLO 2021-01-22 08:45:00 +01:00
parent 48107943f9
commit 384de5758b
Signed by: ynerant
GPG Key ID: 3A75C55819C8CF85
5 changed files with 144 additions and 93 deletions

View File

@ -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',)

View File

@ -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'),
),
]

View File

@ -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,

View File

@ -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>

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: TFJM\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-01-21 22:34+0100\n"
"POT-Creation-Date: 2021-01-22 08:43+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Yohann D'ANELLO <yohann.danello@animath.fr>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -100,7 +100,7 @@ msgid "Changelog of type \"{action}\" for model {model} at {timestamp}"
msgstr "Changelog de type \"{action}\" pour le modèle {model} le {timestamp}"
#: apps/participation/admin.py:19 apps/participation/models.py:298
#: apps/participation/tables.py:44 apps/registration/models.py:335
#: apps/participation/tables.py:44 apps/registration/models.py:345
msgid "valid"
msgstr "valide"
@ -513,9 +513,9 @@ msgstr "Rejoindre"
#: apps/participation/templates/participation/update_team.html:12
#: apps/registration/templates/registration/payment_form.html:49
#: apps/registration/templates/registration/update_user.html:16
#: apps/registration/templates/registration/user_detail.html:147
#: apps/registration/templates/registration/user_detail.html:156
#: apps/registration/templates/registration/user_detail.html:184
#: apps/registration/templates/registration/user_detail.html:150
#: apps/registration/templates/registration/user_detail.html:159
#: apps/registration/templates/registration/user_detail.html:187
msgid "Update"
msgstr "Modifier"
@ -569,10 +569,10 @@ msgstr "Envoyer une solution"
#: apps/registration/templates/registration/upload_health_sheet.html:17
#: apps/registration/templates/registration/upload_parental_authorization.html:17
#: apps/registration/templates/registration/upload_photo_authorization.html:18
#: apps/registration/templates/registration/user_detail.html:162
#: apps/registration/templates/registration/user_detail.html:167
#: apps/registration/templates/registration/user_detail.html:172
#: apps/registration/templates/registration/user_detail.html:177
#: apps/registration/templates/registration/user_detail.html:165
#: apps/registration/templates/registration/user_detail.html:170
#: apps/registration/templates/registration/user_detail.html:175
#: apps/registration/templates/registration/user_detail.html:180
msgid "Upload"
msgstr "Téléverser"
@ -1031,7 +1031,7 @@ msgstr "rôle"
msgid "participant"
msgstr "participant"
#: apps/registration/forms.py:24 apps/registration/models.py:236
#: apps/registration/forms.py:24 apps/registration/models.py:246
msgid "coach"
msgstr "encadrant"
@ -1039,11 +1039,11 @@ msgstr "encadrant"
msgid "This email address is already used."
msgstr "Cette adresse e-mail est déjà utilisée."
#: apps/registration/forms.py:55 apps/registration/models.py:262
#: apps/registration/forms.py:55 apps/registration/models.py:272
msgid "volunteer"
msgstr "bénévole"
#: apps/registration/forms.py:56 apps/registration/models.py:281
#: apps/registration/forms.py:56 apps/registration/models.py:291
msgid "admin"
msgstr "admin"
@ -1073,7 +1073,7 @@ msgstr "email confirmé"
msgid "Activate your TFJM² account"
msgstr "Activez votre compte du TFJM²"
#: apps/registration/models.py:99 apps/registration/models.py:302
#: apps/registration/models.py:99 apps/registration/models.py:312
msgid "registration"
msgstr "inscription"
@ -1086,139 +1086,155 @@ msgid "birth date"
msgstr "date de naissance"
#: apps/registration/models.py:132
msgid "gender"
msgstr "genre"
#: apps/registration/models.py:134
msgid "Female"
msgstr "Femme"
#: apps/registration/models.py:135
msgid "Male"
msgstr "Homme"
#: apps/registration/models.py:136
msgid "Other"
msgstr "Autre"
#: apps/registration/models.py:142
msgid "address"
msgstr "adresse"
#: apps/registration/models.py:138
#: apps/registration/models.py:148
msgid "phone number"
msgstr "numéro de téléphone"
#: apps/registration/models.py:143
#: apps/registration/models.py:153
msgid "photo authorization"
msgstr "autorisation de droit à l'image"
#: apps/registration/models.py:169
#: apps/registration/models.py:179
msgid "12th grade"
msgstr "Terminale"
#: apps/registration/models.py:170
#: apps/registration/models.py:180
msgid "11th grade"
msgstr "Première"
#: apps/registration/models.py:171
#: apps/registration/models.py:181
msgid "10th grade or lower"
msgstr "Seconde ou inférieur"
#: apps/registration/models.py:173
#: apps/registration/models.py:183
msgid "student class"
msgstr "classe"
#: apps/registration/models.py:178
#: apps/registration/models.py:188
msgid "school"
msgstr "école"
#: apps/registration/models.py:183
#: apps/registration/models.py:193
msgid "responsible name"
msgstr "nom du responsable légal"
#: apps/registration/models.py:188
#: apps/registration/models.py:198
msgid "responsible phone number"
msgstr "numéro de téléphone du responsable légal"
#: apps/registration/models.py:193
#: apps/registration/models.py:203
msgid "responsible email address"
msgstr "adresse e-mail du responsable légal"
#: apps/registration/models.py:198
#: apps/registration/models.py:208
msgid "parental authorization"
msgstr "autorisation parentale"
#: apps/registration/models.py:205
#: apps/registration/models.py:215
msgid "health sheet"
msgstr "fiche sanitaire"
#: apps/registration/models.py:213
#: apps/registration/models.py:223
msgid "student"
msgstr "étudiant"
#: apps/registration/models.py:221
#: apps/registration/models.py:231
msgid "student registration"
msgstr "inscription d'élève"
#: apps/registration/models.py:222
#: apps/registration/models.py:232
msgid "student registrations"
msgstr "inscriptions d'élève"
#: apps/registration/models.py:231 apps/registration/models.py:253
#: apps/registration/models.py:241 apps/registration/models.py:263
msgid "professional activity"
msgstr "activité professionnelle"
#: apps/registration/models.py:244
#: apps/registration/models.py:254
msgid "coach registration"
msgstr "inscription d'encadrant"
#: apps/registration/models.py:245
#: apps/registration/models.py:255
msgid "coach registrations"
msgstr "inscriptions d'encadrants"
#: apps/registration/models.py:276
#: apps/registration/models.py:286
msgid "role of the administrator"
msgstr "rôle de l'administrateur"
#: apps/registration/models.py:289
#: apps/registration/models.py:299
msgid "admin registration"
msgstr "inscription d'administrateur"
#: apps/registration/models.py:290
#: apps/registration/models.py:300
msgid "admin registrations"
msgstr "inscriptions d'administrateur"
#: apps/registration/models.py:306
#: apps/registration/models.py:316
msgid "type"
msgstr "type"
#: apps/registration/models.py:309
#: apps/registration/models.py:319
msgid "No payment"
msgstr "Pas de paiement"
#: apps/registration/models.py:311
#: apps/registration/models.py:321
msgid "Scholarship"
msgstr "Notification de bourse"
#: apps/registration/models.py:312
#: apps/registration/models.py:322
msgid "Bank transfer"
msgstr "Virement bancaire"
#: apps/registration/models.py:313
#: apps/registration/models.py:323
msgid "The tournament is free"
msgstr "Le tournoi est gratuit"
#: apps/registration/models.py:320
#: apps/registration/models.py:330
msgid "scholarship file"
msgstr "Notification de bourse"
#: apps/registration/models.py:321
#: apps/registration/models.py:331
msgid "only if you have a scholarship."
msgstr "Nécessaire seulement si vous déclarez être boursier."
#: apps/registration/models.py:328
#: apps/registration/models.py:338
msgid "additional information"
msgstr "informations additionnelles"
#: apps/registration/models.py:329
#: apps/registration/models.py:339
msgid "To help us to find your payment."
msgstr "Pour nous aider à retrouver votre paiement, si nécessaire."
#: apps/registration/models.py:344
#: apps/registration/models.py:354
#, python-brace-format
msgid "Payment of {registration}"
msgstr "Paiement de {registration}"
#: apps/registration/models.py:347
#: apps/registration/models.py:357
msgid "payment"
msgstr "paiement"
#: apps/registration/models.py:348
#: apps/registration/models.py:358
msgid "payments"
msgstr "paiements"
@ -1450,9 +1466,9 @@ msgstr "Modèle de fiche sanitaire :"
#: apps/registration/templates/registration/upload_health_sheet.html:12
#: apps/registration/templates/registration/upload_parental_authorization.html:12
#: apps/registration/templates/registration/user_detail.html:54
#: apps/registration/templates/registration/user_detail.html:67
#: apps/registration/templates/registration/user_detail.html:77
#: apps/registration/templates/registration/user_detail.html:57
#: apps/registration/templates/registration/user_detail.html:70
#: apps/registration/templates/registration/user_detail.html:80
msgid "Download"
msgstr "Télécharger"
@ -1501,106 +1517,110 @@ msgid "Birth date:"
msgstr "Date de naissance :"
#: apps/registration/templates/registration/user_detail.html:45
msgid "Gender:"
msgstr "Genre :"
#: apps/registration/templates/registration/user_detail.html:48
msgid "Address:"
msgstr "Adresse :"
#: apps/registration/templates/registration/user_detail.html:48
#: apps/registration/templates/registration/user_detail.html:51
msgid "Phone number:"
msgstr "Numéro de téléphone :"
#: apps/registration/templates/registration/user_detail.html:51
#: apps/registration/templates/registration/user_detail.html:54
msgid "Photo authorization:"
msgstr "Autorisation de droit à l'image"
#: apps/registration/templates/registration/user_detail.html:57
#: apps/registration/templates/registration/user_detail.html:70
#: apps/registration/templates/registration/user_detail.html:80
#: apps/registration/templates/registration/user_detail.html:60
#: apps/registration/templates/registration/user_detail.html:73
#: apps/registration/templates/registration/user_detail.html:83
msgid "Replace"
msgstr "Remplacer"
#: apps/registration/templates/registration/user_detail.html:64
#: apps/registration/templates/registration/user_detail.html:67
msgid "Health sheet:"
msgstr "Fiche sanitaire :"
#: apps/registration/templates/registration/user_detail.html:74
#: apps/registration/templates/registration/user_detail.html:77
msgid "Parental authorization:"
msgstr "Autorisation parentale :"
#: apps/registration/templates/registration/user_detail.html:85
#: apps/registration/templates/registration/user_detail.html:88
msgid "Student class:"
msgstr "Classe :"
#: apps/registration/templates/registration/user_detail.html:88
#: apps/registration/templates/registration/user_detail.html:91
msgid "School:"
msgstr "École :"
#: apps/registration/templates/registration/user_detail.html:91
#: apps/registration/templates/registration/user_detail.html:94
msgid "Responsible name:"
msgstr "Nom du responsable légal :"
#: apps/registration/templates/registration/user_detail.html:94
#: apps/registration/templates/registration/user_detail.html:97
msgid "Responsible phone number:"
msgstr "Numéro de téléphone du responsable légal :"
#: apps/registration/templates/registration/user_detail.html:97
#: apps/registration/templates/registration/user_detail.html:100
msgid "Responsible email address:"
msgstr "Adresse e-mail du responsable légal :"
#: apps/registration/templates/registration/user_detail.html:102
#: apps/registration/templates/registration/user_detail.html:105
msgid "Role:"
msgstr "Rôle :"
#: apps/registration/templates/registration/user_detail.html:105
#: apps/registration/templates/registration/user_detail.html:108
msgid "Profesional activity:"
msgstr "Activité professionnelle :"
#: apps/registration/templates/registration/user_detail.html:109
#: apps/registration/templates/registration/user_detail.html:112
msgid "Grant Animath to contact me in the future about other actions:"
msgstr "Autorise Animath à recontacter à propos d'autres actions :"
#: apps/registration/templates/registration/user_detail.html:117
#: apps/registration/templates/registration/user_detail.html:120
msgid "Payment information:"
msgstr "Informations de paiement :"
#: apps/registration/templates/registration/user_detail.html:119
#: apps/registration/templates/registration/user_detail.html:122
msgid "yes,no,pending"
msgstr "oui,non,en attente"
#: apps/registration/templates/registration/user_detail.html:123
#: apps/registration/templates/registration/user_detail.html:126
#: apps/registration/templates/registration/user_detail.html:129
msgid "valid:"
msgstr "valide :"
#: apps/registration/templates/registration/user_detail.html:130
#: apps/registration/templates/registration/user_detail.html:183
#: apps/registration/templates/registration/user_detail.html:133
#: apps/registration/templates/registration/user_detail.html:186
msgid "Update payment"
msgstr "Modifier le paiement"
#: apps/registration/templates/registration/user_detail.html:136
#: apps/registration/templates/registration/user_detail.html:139
msgid "Download scholarship attestation"
msgstr "Télécharger l'attestation de bourse"
#: apps/registration/templates/registration/user_detail.html:149
#: apps/registration/templates/registration/user_detail.html:152
msgid "Impersonate"
msgstr "Impersonifier"
#: apps/registration/templates/registration/user_detail.html:155
#: apps/registration/templates/registration/user_detail.html:158
msgid "Update user"
msgstr "Modifier l'utilisateur"
#: apps/registration/templates/registration/user_detail.html:161
#: apps/registration/views.py:315
#: apps/registration/templates/registration/user_detail.html:164
#: apps/registration/views.py:319
msgid "Upload photo authorization"
msgstr "Téléverser l'autorisation de droit à l'image"
#: apps/registration/templates/registration/user_detail.html:166
#: apps/registration/views.py:341
#: apps/registration/templates/registration/user_detail.html:169
#: apps/registration/views.py:345
msgid "Upload health sheet"
msgstr "Téléverser la fiche sanitaire"
#: apps/registration/templates/registration/user_detail.html:171
#: apps/registration/templates/registration/user_detail.html:176
#: apps/registration/views.py:367
#: apps/registration/templates/registration/user_detail.html:174
#: apps/registration/templates/registration/user_detail.html:179
#: apps/registration/views.py:371
msgid "Upload parental authorization"
msgstr "Téléverser l'autorisation parentale"
@ -1608,52 +1628,52 @@ msgstr "Téléverser l'autorisation parentale"
msgid "New TFJM² organizer account"
msgstr "Nouveau compte organisateur pour le TFJM²"
#: apps/registration/views.py:149
#: apps/registration/views.py:153
msgid "Email validation"
msgstr "Validation de l'adresse mail"
#: apps/registration/views.py:151
#: apps/registration/views.py:155
msgid "Validate email"
msgstr "Valider l'adresse mail"
#: apps/registration/views.py:190
#: apps/registration/views.py:194
msgid "Email validation unsuccessful"
msgstr "Échec de la validation de l'adresse mail"
#: apps/registration/views.py:201
#: apps/registration/views.py:205
msgid "Email validation email sent"
msgstr "Mail de confirmation de l'adresse mail envoyé"
#: apps/registration/views.py:209
#: apps/registration/views.py:213
msgid "Resend email validation link"
msgstr "Renvoyé le lien de validation de l'adresse mail"
#: apps/registration/views.py:249
#: apps/registration/views.py:253
#, python-brace-format
msgid "Detail of user {user}"
msgstr "Détails de l'utilisateur {user}"
#: apps/registration/views.py:279
#: apps/registration/views.py:283
#, python-brace-format
msgid "Update user {user}"
msgstr "Mise à jour de l'utilisateur {user}"
#: apps/registration/views.py:476
#: apps/registration/views.py:480
#, python-brace-format
msgid "Photo authorization of {student}.{ext}"
msgstr "Autorisation de droit à l'image de {student}.{ext}"
#: apps/registration/views.py:499
#: apps/registration/views.py:503
#, python-brace-format
msgid "Health sheet of {student}.{ext}"
msgstr "Fiche sanitaire de {student}.{ext}"
#: apps/registration/views.py:522
#: apps/registration/views.py:526
#, python-brace-format
msgid "Parental authorization of {student}.{ext}"
msgstr "Autorisation parentale de {student}.{ext}"
#: apps/registration/views.py:544
#: apps/registration/views.py:548
#, python-brace-format
msgid "Scholarship attestation of {user}.{ext}"
msgstr "Notification de bourse de {user}.{ext}"