1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2025-02-25 20:26:29 +00:00

Compare commits

..

No commits in common. "17057a5fe5ac9c8cc0ed8276565a98c44d358dab" and "9ec35c917f098afbb8c462b4b862ddd92a014141" have entirely different histories.

13 changed files with 79 additions and 154 deletions

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: TFJM\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-01-20 18:25+0100\n"
"POT-Creation-Date: 2024-01-16 22:28+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Emmy D'Anello <emmy.danello@animath.fr>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -933,8 +933,8 @@ msgstr "Rejoindre"
#: participation/templates/participation/update_team.html:12
#: registration/templates/registration/payment_form.html:49
#: registration/templates/registration/update_user.html:16
#: registration/templates/registration/user_detail.html:180
#: registration/templates/registration/user_detail.html:217
#: registration/templates/registration/user_detail.html:174
#: registration/templates/registration/user_detail.html:211
msgid "Update"
msgstr "Modifier"
@ -1000,11 +1000,11 @@ msgstr "Envoyer une solution"
#: registration/templates/registration/upload_parental_authorization.html:17
#: registration/templates/registration/upload_photo_authorization.html:18
#: registration/templates/registration/upload_vaccine_sheet.html:13
#: registration/templates/registration/user_detail.html:190
#: registration/templates/registration/user_detail.html:195
#: registration/templates/registration/user_detail.html:200
#: registration/templates/registration/user_detail.html:205
#: registration/templates/registration/user_detail.html:210
#: registration/templates/registration/user_detail.html:184
#: registration/templates/registration/user_detail.html:189
#: registration/templates/registration/user_detail.html:194
#: registration/templates/registration/user_detail.html:199
#: registration/templates/registration/user_detail.html:204
msgid "Upload"
msgstr "Téléverser"
@ -1635,7 +1635,7 @@ msgstr "rôle"
msgid "participant"
msgstr "participant⋅e"
#: registration/forms.py:25 registration/models.py:298
#: registration/forms.py:25 registration/models.py:290
msgid "coach"
msgstr "encadrant⋅e"
@ -1660,7 +1660,7 @@ msgstr "email confirmé"
msgid "Activate your TFJM² account"
msgstr "Activez votre compte du TFJM²"
#: registration/models.py:95 registration/models.py:351
#: registration/models.py:95 registration/models.py:343
msgid "registration"
msgstr "inscription"
@ -1801,35 +1801,23 @@ msgstr "inscription d'élève"
msgid "student registrations"
msgstr "inscriptions d'élève"
#: registration/models.py:287
msgid "most recent degree in mathematics, computer science or physics"
msgstr "Dernier diplôme obtenu en mathématiques, informatique ou physique"
#: registration/models.py:288
msgid ""
"Your most recent degree in maths, computer science or physics, or your last "
"entrance exam (CAPES, Agrégation,…)"
msgstr ""
"Votre dernier diplôme en mathématiques, informatique ou physique, ou votre "
"dernier concours obtenu (CAPES, Agrégation, …)"
#: registration/models.py:293 registration/models.py:315
#: registration/models.py:285 registration/models.py:307
msgid "professional activity"
msgstr "activité professionnelle"
#: registration/models.py:306
#: registration/models.py:298
msgid "coach registration"
msgstr "inscription d'encadrant⋅e"
#: registration/models.py:307
#: registration/models.py:299
msgid "coach registrations"
msgstr "inscriptions d'encadrant⋅es"
#: registration/models.py:319
#: registration/models.py:311
msgid "administrator"
msgstr "administrateur⋅rice"
#: registration/models.py:320
#: registration/models.py:312
msgid ""
"An administrator has all rights. Please don't give this right to all juries "
"and volunteers."
@ -1837,76 +1825,76 @@ msgstr ""
"Un⋅e administrateur⋅rice a tous les droits. Merci de ne pas donner ce droit "
"à toustes les juré⋅es et bénévoles."
#: registration/models.py:330
#: registration/models.py:322
msgid "admin"
msgstr "admin"
#: registration/models.py:330
#: registration/models.py:322
msgid "volunteer"
msgstr "bénévole"
#: registration/models.py:338
#: registration/models.py:330
msgid "volunteer registration"
msgstr "inscription de bénévole"
#: registration/models.py:339
#: registration/models.py:331
msgid "volunteer registrations"
msgstr "inscriptions de bénévoles"
#: registration/models.py:355
#: registration/models.py:347
msgid "type"
msgstr "type"
#: registration/models.py:358
#: registration/models.py:350
msgid "No payment"
msgstr "Pas de paiement"
#: registration/models.py:360
#: registration/models.py:352
msgid "Scholarship"
msgstr "Notification de bourse"
#: registration/models.py:361
#: registration/models.py:353
msgid "Bank transfer"
msgstr "Virement bancaire"
#: registration/models.py:362
#: registration/models.py:354
msgid "Other (please indicate)"
msgstr "Autre (veuillez spécifier)"
#: registration/models.py:363
#: registration/models.py:355
msgid "The tournament is free"
msgstr "Le tournoi est gratuit"
#: registration/models.py:370
#: registration/models.py:362
msgid "scholarship file"
msgstr "Notification de bourse"
#: registration/models.py:371
#: registration/models.py:363
msgid "only if you have a scholarship."
msgstr "Nécessaire seulement si vous déclarez être boursier."
#: registration/models.py:378
#: registration/models.py:370
msgid "additional information"
msgstr "informations additionnelles"
#: registration/models.py:379
#: registration/models.py:371
msgid "To help us to find your payment."
msgstr "Pour nous aider à retrouver votre paiement, si nécessaire."
#: registration/models.py:385
#: registration/models.py:377
msgid "payment valid"
msgstr "paiement valide"
#: registration/models.py:394
#: registration/models.py:386
#, python-brace-format
msgid "Payment of {registration}"
msgstr "Paiement de {registration}"
#: registration/models.py:397
#: registration/models.py:389
msgid "payment"
msgstr "paiement"
#: registration/models.py:398
#: registration/models.py:390
msgid "payments"
msgstr "paiements"
@ -1956,8 +1944,8 @@ msgstr ""
#: registration/templates/registration/mails/add_organizer.html:37
#: registration/templates/registration/mails/add_organizer.txt:17
#: registration/templates/registration/mails/email_validation_email.html:39
#: registration/templates/registration/mails/email_validation_email.txt:15
#: registration/templates/registration/mails/email_validation_email.html:35
#: registration/templates/registration/mails/email_validation_email.txt:13
msgid "The TFJM² team."
msgstr "L'équipe du TFJM²"
@ -1986,11 +1974,6 @@ msgstr ""
#: registration/templates/registration/mails/email_validation_email.html:30
#: registration/templates/registration/mails/email_validation_email.txt:11
msgid "As a reminder, your username is your email address:"
msgstr "Pour rappel, vous nom d'utilisateur⋅rice est votre adresse email :"
#: registration/templates/registration/mails/email_validation_email.html:34
#: registration/templates/registration/mails/email_validation_email.txt:13
msgid "Thanks"
msgstr "Merci"
@ -2020,7 +2003,7 @@ msgstr "Votre mot de passe a été changé. Vous pouvez désormais vous connecte
#: tfjm/templates/base.html:136 tfjm/templates/base.html:262
#: tfjm/templates/base.html:263 tfjm/templates/registration/login.html:7
#: tfjm/templates/registration/login.html:8
#: tfjm/templates/registration/login.html:30
#: tfjm/templates/registration/login.html:25
msgid "Log in"
msgstr "Connexion"
@ -2239,65 +2222,60 @@ msgid "Responsible email address:"
msgstr "Adresse e-mail de læ responsable légal⋅e :"
#: registration/templates/registration/user_detail.html:127
msgid "Most recent degree:"
msgstr "Dernier diplôme obtenu :"
#: registration/templates/registration/user_detail.html:130
#: registration/templates/registration/user_detail.html:134
msgid "Professional activity:"
msgid "Profesional activity:"
msgstr "Activité professionnelle :"
#: registration/templates/registration/user_detail.html:137
#: registration/templates/registration/user_detail.html:131
msgid "Admin:"
msgstr "Administrateur⋅rice :"
#: registration/templates/registration/user_detail.html:142
#: registration/templates/registration/user_detail.html:136
msgid "Grant Animath to contact me in the future about other actions:"
msgstr "Autorise Animath à recontacter à propos d'autres actions :"
#: registration/templates/registration/user_detail.html:150
#: registration/templates/registration/user_detail.html:144
msgid "Payment information:"
msgstr "Informations de paiement :"
#: registration/templates/registration/user_detail.html:152
#: registration/templates/registration/user_detail.html:146
msgid "yes,no,pending"
msgstr "oui,non,en attente"
#: registration/templates/registration/user_detail.html:156
#: registration/templates/registration/user_detail.html:159
#: registration/templates/registration/user_detail.html:150
#: registration/templates/registration/user_detail.html:153
msgid "valid:"
msgstr "valide :"
#: registration/templates/registration/user_detail.html:163
#: registration/templates/registration/user_detail.html:216
#: registration/templates/registration/user_detail.html:157
#: registration/templates/registration/user_detail.html:210
msgid "Update payment"
msgstr "Modifier le paiement"
#: registration/templates/registration/user_detail.html:169
#: registration/templates/registration/user_detail.html:163
msgid "Download scholarship attestation"
msgstr "Télécharger l'attestation de bourse"
#: registration/templates/registration/user_detail.html:182
#: registration/templates/registration/user_detail.html:176
msgid "Impersonate"
msgstr "Impersonifier"
#: registration/templates/registration/user_detail.html:189
#: registration/templates/registration/user_detail.html:183
#: registration/views.py:312
msgid "Upload photo authorization"
msgstr "Téléverser l'autorisation de droit à l'image"
#: registration/templates/registration/user_detail.html:194
#: registration/templates/registration/user_detail.html:188
#: registration/views.py:333
msgid "Upload health sheet"
msgstr "Téléverser la fiche sanitaire"
#: registration/templates/registration/user_detail.html:199
#: registration/templates/registration/user_detail.html:193
#: registration/views.py:354
msgid "Upload vaccine sheet"
msgstr "Téléverser le carnet de vaccination"
#: registration/templates/registration/user_detail.html:204
#: registration/templates/registration/user_detail.html:209
#: registration/templates/registration/user_detail.html:198
#: registration/templates/registration/user_detail.html:203
#: registration/views.py:375
msgid "Upload parental authorization"
msgstr "Téléverser l'autorisation parentale"
@ -2336,36 +2314,36 @@ msgstr "Détails de l'utilisateur⋅rice {user}"
msgid "Update user {user}"
msgstr "Mise à jour de l'utilisateur⋅rice {user}"
#: registration/views.py:487
#: registration/views.py:481
#, python-brace-format
msgid "Photo authorization of {student}.{ext}"
msgstr "Autorisation de droit à l'image de {student}.{ext}"
#: registration/views.py:510
#: registration/views.py:504
#, python-brace-format
msgid "Health sheet of {student}.{ext}"
msgstr "Fiche sanitaire de {student}.{ext}"
#: registration/views.py:533
#: registration/views.py:527
#, python-brace-format
msgid "Vaccine sheet of {student}.{ext}"
msgstr "Carnet de vaccination de {student}.{ext}"
#: registration/views.py:556
#: registration/views.py:550
#, python-brace-format
msgid "Parental authorization of {student}.{ext}"
msgstr "Autorisation parentale de {student}.{ext}"
#: registration/views.py:578
#: registration/views.py:572
#, python-brace-format
msgid "Scholarship attestation of {user}.{ext}"
msgstr "Notification de bourse de {user}.{ext}"
#: tfjm/settings.py:164
#: tfjm/settings.py:167
msgid "English"
msgstr "Anglais"
#: tfjm/settings.py:165
#: tfjm/settings.py:168
msgid "French"
msgstr "Français"
@ -2510,12 +2488,8 @@ msgstr ""
"Vous êtes connecté⋅e en tant que %(user)s, mais n'êtes pas autorisé⋅e à "
"accéder à cette page. Voulez-vous vous reconnecter avec un autre compte ?"
#: tfjm/templates/registration/login.html:25
msgid "Your username is your e-mail address."
msgstr "Votre identifiant est votre adresse e-mail."
#: tfjm/templates/registration/login.html:28
msgid "Forgotten your password?"
#: tfjm/templates/registration/login.html:23
msgid "Forgotten your password or username?"
msgstr "Mot de passe oublié ?"
#: tfjm/templates/search/search.html:6 tfjm/templates/search/search.html:10

View File

@ -206,7 +206,7 @@ class CoachRegistrationForm(forms.ModelForm):
class Meta:
model = CoachRegistration
fields = ('team', 'gender', 'address', 'zip_code', 'city', 'phone_number',
'last_degree', 'professional_activity', 'health_issues', 'housing_constraints',
'professional_activity', 'health_issues', 'housing_constraints',
'give_contact_to_animath', 'email_confirmed',)

View File

@ -1,22 +0,0 @@
# Generated by Django 5.0.1 on 2024-01-20 17:26
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("registration", "0009_participantregistration_housing_constraints_and_more"),
]
operations = [
migrations.AddField(
model_name="coachregistration",
name="last_degree",
field=models.CharField(
default="",
help_text="Your most recent degree in maths, computer science or physics, or your last entrance exam (CAPES, Agrégation,…)",
max_length=255,
verbose_name="most recent degree in mathematics, computer science or physics",
),
),
]

View File

@ -281,14 +281,6 @@ class CoachRegistration(ParticipantRegistration):
Specific registration for coaches.
They have a team and a professional activity.
"""
last_degree = models.CharField(
max_length=255,
default="",
verbose_name=_("most recent degree in mathematics, computer science or physics"),
help_text=_("Your most recent degree in maths, computer science or physics, "
"or your last entrance exam (CAPES, Agrégation,…)"),
)
professional_activity = models.TextField(
verbose_name=_("professional activity"),
)

View File

@ -26,10 +26,6 @@
{% trans "This link is only valid for a couple of days, after that you will need to contact us to validate your email." %}
</p>
<p>
{% trans "As a reminder, your username is your email address:" %} {{ user.email }}.
</p>
<p>
{% trans "Thanks" %},
</p>

View File

@ -8,8 +8,6 @@ https://{{ domain }}{% url 'registration:email_validation' uidb64=uid token=toke
{% trans "This link is only valid for a couple of days, after that you will need to contact us to validate your email." %}
{% trans "As a reminder, your username is your email address:" %} {{ user.email }}
{% trans "Thanks" %},
{% trans "The TFJM² team." %}

View File

@ -123,19 +123,14 @@
{% with user_object.registration.responsible_email as email %}
<dd class="col-sm-6"><a href="mailto:{{ email }}">{{ email }}</a></dd>
{% endwith %}
{% elif user_object.registration.coachregistration %}
<dt class="col-sm-6 text-end">{% trans "Most recent degree:" %}</dt>
<dd class="col-sm-6">{{ user_object.registration.last_degree }}</dd>
<dt class="col-sm-6 text-end">{% trans "Professional activity:" %}</dt>
{% elif user_object.registration.coachregistration or user_object.registration.is_volunteer %}
<dt class="col-sm-6 text-end">{% trans "Profesional activity:" %}</dt>
<dd class="col-sm-6">{{ user_object.registration.professional_activity }}</dd>
{% elif user_object.registration.is_volunteer %}
<dt class="col-sm-6 text-end">{% trans "Professional activity:" %}</dt>
<dd class="col-sm-6">{{ user_object.registration.professional_activity }}</dd>
<dt class="col-sm-6 text-end">{% trans "Admin:" %}</dt>
<dd class="col-sm-6">{{ user_object.registration.is_admin|yesno }}</dd>
{% if user_object.registration.is_volunteer %}
<dt class="col-sm-6 text-end">{% trans "Admin:" %}</dt>
<dd class="col-sm-6">{{ user_object.registration.is_admin|yesno }}</dd>
{% endif %}
{% endif %}
<dt class="col-sm-6 text-end">{% trans "Grant Animath to contact me in the future about other actions:" %}</dt>

View File

@ -196,7 +196,6 @@ class TestRegistration(TestCase):
city="Paris",
phone_number="0123456789",
professional_activity="God",
last_degree="Master",
give_contact_to_animath=True,
))
self.assertRedirects(response, reverse("registration:email_validation_sent"), 302, 200)
@ -277,7 +276,7 @@ class TestRegistration(TestCase):
city="Paris", responsible_name="Toto",
responsible_phone="0123456789",
responsible_email="toto@example.com")),
(self.coach, dict(professional_activity="God", last_degree="Médaille Fields", gender="male",
(self.coach, dict(professional_activity="God", gender="male",
address="1 Rue de Rivoli", zip_code=75001, city="Paris"))]:
response = self.client.get(reverse("registration:update_user", args=(user.pk,)))
self.assertEqual(response.status_code, 200)

View File

@ -16,7 +16,7 @@ from django.http import FileResponse, Http404
from django.shortcuts import redirect, resolve_url
from django.template.loader import render_to_string
from django.urls import reverse_lazy
from django.utils import timezone, translation
from django.utils import timezone
from django.utils.crypto import get_random_string
from django.utils.http import urlsafe_base64_decode
from django.utils.translation import gettext_lazy as _
@ -390,8 +390,6 @@ class AuthorizationTemplateView(TemplateView):
def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
translation.activate("fr")
if "registration_id" in self.request.GET:
registration = Registration.objects.get(pk=self.request.GET.get("registration_id"))
# Don't get unwanted information
@ -402,10 +400,6 @@ class AuthorizationTemplateView(TemplateView):
if not Tournament.objects.filter(pk=self.request.GET.get("tournament_id")).exists():
raise PermissionDenied("Ce tournoi n'existe pas.")
context["tournament"] = Tournament.objects.get(pk=self.request.GET.get("tournament_id"))
elif "tournament_name" in self.request.GET:
if not Tournament.objects.filter(name__iexact=self.request.GET.get("tournament_name")).exists():
raise PermissionDenied("Ce tournoi n'existe pas.")
context["tournament"] = Tournament.objects.get(name__iexact=self.request.GET.get("tournament_name"))
else:
raise PermissionDenied("Merci d'indiquer un tournoi.")

View File

@ -206,9 +206,6 @@ HAYSTACK_CONNECTIONS = {
}
}
HAYSTACK_SIGNAL_PROCESSOR = 'haystack.signals.RealtimeSignalProcessor' if os.getenv("HAYSTACK_INDEX_NAME", None) \
else 'haystack.signals.BaseSignalProcessor'
_db_type = os.getenv('DJANGO_DB_TYPE', 'sqlite').lower()
if _db_type == 'mysql' or _db_type.startswith('postgres') or _db_type == 'psql': # pragma: no cover

View File

@ -37,3 +37,5 @@ CHANNEL_LAYERS = {
},
},
}
HAYSTACK_SIGNAL_PROCESSOR = 'haystack.signals.RealtimeSignalProcessor'

View File

@ -18,14 +18,9 @@ SPDX-License-Identifier: GPL-2.0-or-later
{% endif %}
<form method="post" id="login-form">
<div id="form-content">
{{ form|as_crispy_errors }}
{% csrf_token %}
{{ form.username|as_crispy_field }}
<div class="form-text mb-3">
<i class="fas fa-info-circle"></i> {% trans "Your username is your e-mail address." %}
</div>
{{ form.password|as_crispy_field }}
<a href="{% url 'password_reset' %}" class="badge text-bg-warning">{% trans 'Forgotten your password?' %}</a>
{{ form | crispy }}
<a href="{% url 'password_reset' %}" class="badge text-bg-warning">{% trans 'Forgotten your password or username?' %}</a>
</div>
<input type="submit" value="{% trans 'Log in' %}" class="btn btn-primary">
</form>

View File

@ -60,6 +60,11 @@ urlpatterns = [
name='synthesis'),
]
if 'cas_server' in settings.INSTALLED_APPS: # pragma: no cover
urlpatterns += [
path('cas/', include('cas_server.urls', namespace="cas_server")),
]
if settings.DEBUG:
# Serve static files in DEBUG mode
import django.contrib.staticfiles.urls