mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2024-11-30 16:13:03 +00:00
Compare commits
6 Commits
ff6d824fd5
...
85b3da09f6
Author | SHA1 | Date | |
---|---|---|---|
|
85b3da09f6 | ||
|
2c15774185 | ||
|
08ad4f3888 | ||
|
872009894d | ||
|
fd7fe90fce | ||
|
2ad538f5cc |
@ -929,7 +929,7 @@ class DrawConsumer(AsyncJsonWebsocketConsumer):
|
||||
td.purposed = None
|
||||
await td.asave()
|
||||
|
||||
remaining = len(settings.PROBLEMS) - 5 - len(td.rejected)
|
||||
remaining = len(settings.PROBLEMS) - settings.RECOMMENDED_SOLUTIONS_COUNT - len(td.rejected)
|
||||
|
||||
# Update messages
|
||||
trigram = td.participation.team.trigram
|
||||
|
27
draw/migrations/0004_alter_round_number.py
Normal file
27
draw/migrations/0004_alter_round_number.py
Normal file
@ -0,0 +1,27 @@
|
||||
# Generated by Django 5.0.6 on 2024-06-07 12:46
|
||||
|
||||
import django.core.validators
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("draw", "0003_alter_teamdraw_options"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name="round",
|
||||
name="number",
|
||||
field=models.PositiveSmallIntegerField(
|
||||
choices=[(1, "Round 1"), (2, "Round 2")],
|
||||
help_text="The number of the round, 1 or 2 (or 3 for ETEAM)",
|
||||
validators=[
|
||||
django.core.validators.MinValueValidator(1),
|
||||
django.core.validators.MaxValueValidator(2),
|
||||
],
|
||||
verbose_name="number",
|
||||
),
|
||||
),
|
||||
]
|
@ -147,10 +147,10 @@ class Draw(models.Model):
|
||||
else:
|
||||
# The problem can be rejected
|
||||
s += "Elle peut décider d'accepter ou de refuser ce problème. "
|
||||
if len(td.rejected) >= len(settings.PROBLEMS) - 5:
|
||||
if len(td.rejected) >= len(settings.PROBLEMS) - settings.RECOMMENDED_SOLUTIONS_COUNT:
|
||||
s += "Refuser ce problème ajoutera une nouvelle pénalité de 25 % sur le coefficient de l'oral de la défense."
|
||||
else:
|
||||
s += f"Il reste {len(settings.PROBLEMS) - 5 - len(td.rejected)} refus sans pénalité."
|
||||
s += f"Il reste {len(settings.PROBLEMS) - settings.RECOMMENDED_SOLUTIONS_COUNT - len(td.rejected)} refus sans pénalité."
|
||||
case 'WAITING_FINAL':
|
||||
# We are between the two rounds of the final tournament
|
||||
s += "Le tirage au sort pour le tour 2 aura lieu à la fin du premier tour. Bon courage !"
|
||||
@ -193,10 +193,10 @@ class Round(models.Model):
|
||||
choices=[
|
||||
(1, _('Round 1')),
|
||||
(2, _('Round 2')),
|
||||
],
|
||||
] + ([] if settings.NB_ROUNDS == 2 else [(3, _('Round 3'))]),
|
||||
verbose_name=_('number'),
|
||||
help_text=_("The number of the round, 1 or 2"),
|
||||
validators=[MinValueValidator(1), MaxValueValidator(2)],
|
||||
help_text=_("The number of the round, 1 or 2 (or 3 for ETEAM)"),
|
||||
validators=[MinValueValidator(1), MaxValueValidator(settings.NB_ROUNDS)],
|
||||
)
|
||||
|
||||
current_pool = models.ForeignKey(
|
||||
@ -524,10 +524,10 @@ class TeamDraw(models.Model):
|
||||
@property
|
||||
def penalty_int(self):
|
||||
"""
|
||||
The number of penalties, which is the number of rejected problems after the P - 5 free rejects,
|
||||
where P is the number of problems.
|
||||
The number of penalties, which is the number of rejected problems after the P - 5 free rejects
|
||||
(P - 6 for ETEAM), where P is the number of problems.
|
||||
"""
|
||||
return max(0, len(self.rejected) - (len(settings.PROBLEMS) - 5))
|
||||
return max(0, len(self.rejected) - (len(settings.PROBLEMS) - settings.RECOMMENDED_SOLUTIONS_COUNT))
|
||||
|
||||
@property
|
||||
def penalty(self):
|
||||
|
@ -4,6 +4,9 @@
|
||||
await Notification.requestPermission()
|
||||
})()
|
||||
|
||||
// TODO ETEAM Mieux paramétriser (5 pour le TFJM², 6 pour l'ETEAM)
|
||||
const RECOMMENDED_SOLUTIONS_COUNT = 6
|
||||
|
||||
const problems_count = JSON.parse(document.getElementById('problems_count').textContent)
|
||||
|
||||
const tournaments = JSON.parse(document.getElementById('tournaments_list').textContent)
|
||||
@ -658,15 +661,16 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
recapDiv.textContent = `🗑️ ${rejected.join(', ')}`
|
||||
|
||||
let penaltyDiv = document.getElementById(`recap-${tid}-round-${round}-team-${team}-penalty`)
|
||||
if (rejected.length > problems_count - 5) {
|
||||
if (rejected.length > problems_count - RECOMMENDED_SOLUTIONS_COUNT) {
|
||||
// If more than P - 5 problems were rejected, add a penalty of 25% of the coefficient of the oral defender
|
||||
// This is P - 6 for the ETEAM
|
||||
if (penaltyDiv === null) {
|
||||
penaltyDiv = document.createElement('div')
|
||||
penaltyDiv.id = `recap-${tid}-round-${round}-team-${team}-penalty`
|
||||
penaltyDiv.classList.add('badge', 'rounded-pill', 'text-bg-info')
|
||||
recapDiv.parentNode.append(penaltyDiv)
|
||||
}
|
||||
penaltyDiv.textContent = `❌ ${25 * (rejected.length - (problems_count - 5))} %`
|
||||
penaltyDiv.textContent = `❌ ${25 * (rejected.length - (problems_count - RECOMMENDED_SOLUTIONS_COUNT))} %`
|
||||
} else {
|
||||
// Eventually remove this div
|
||||
if (penaltyDiv !== null)
|
||||
|
File diff suppressed because it is too large
Load Diff
31
participation/migrations/0014_alter_team_trigram.py
Normal file
31
participation/migrations/0014_alter_team_trigram.py
Normal file
@ -0,0 +1,31 @@
|
||||
# Generated by Django 5.0.6 on 2024-06-07 12:46
|
||||
|
||||
import django.core.validators
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("participation", "0013_alter_pool_options_pool_room"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name="team",
|
||||
name="trigram",
|
||||
field=models.CharField(
|
||||
help_text="The code must be composed of 3 uppercase letters.",
|
||||
max_length=3,
|
||||
unique=True,
|
||||
validators=[
|
||||
django.core.validators.RegexValidator("^[A-Z]{3}$"),
|
||||
django.core.validators.RegexValidator(
|
||||
"^(?!BIT$|CNO$|CRO$|CUL$|FTG$|FCK$|FUC$|FUK$|FYS$|HIV$|IST$|MST$|KKK$|KYS$|SEX$)",
|
||||
message="This team code is forbidden.",
|
||||
),
|
||||
],
|
||||
verbose_name="code",
|
||||
),
|
||||
),
|
||||
]
|
@ -1,6 +1,6 @@
|
||||
# Copyright (C) 2020 by Animath
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
import math
|
||||
from datetime import date, timedelta
|
||||
import os
|
||||
|
||||
@ -37,14 +37,15 @@ class Team(models.Model):
|
||||
)
|
||||
|
||||
trigram = models.CharField(
|
||||
max_length=3,
|
||||
verbose_name=_("trigram"),
|
||||
help_text=_("The trigram must be composed of three uppercase letters."),
|
||||
max_length=settings.TEAM_CODE_LENGTH,
|
||||
verbose_name=_("code"),
|
||||
help_text=format_lazy(_("The code must be composed of {nb_letters} uppercase letters."),
|
||||
nb_letters=settings.TEAM_CODE_LENGTH),
|
||||
unique=True,
|
||||
validators=[
|
||||
RegexValidator(r"^[A-Z]{3}$"),
|
||||
RegexValidator("^[A-Z]{" + str(settings.TEAM_CODE_LENGTH) + "}$"),
|
||||
RegexValidator(fr"^(?!{'|'.join(f'{t}$' for t in settings.FORBIDDEN_TRIGRAMS)})",
|
||||
message=_("This trigram is forbidden.")),
|
||||
message=_("This team code is forbidden.")),
|
||||
],
|
||||
)
|
||||
|
||||
@ -940,7 +941,7 @@ class Pool(models.Model):
|
||||
choices=[
|
||||
(1, format_lazy(_("Round {round}"), round=1)),
|
||||
(2, format_lazy(_("Round {round}"), round=2)),
|
||||
]
|
||||
] + ([] if settings.NB_ROUNDS == 2 else [(3, format_lazy(_("Round {round}"), round=3))]),
|
||||
)
|
||||
|
||||
letter = models.PositiveSmallIntegerField(
|
||||
@ -1010,12 +1011,16 @@ class Pool(models.Model):
|
||||
def solutions(self):
|
||||
return [passage.defended_solution for passage in self.passages.all()]
|
||||
|
||||
@property
|
||||
def coeff(self):
|
||||
return 1 if self.round <= 2 else math.pi - 2
|
||||
|
||||
def average(self, participation):
|
||||
return sum(passage.average(participation) for passage in self.passages.all()) \
|
||||
return self.coeff * sum(passage.average(participation) for passage in self.passages.all()) \
|
||||
+ sum(tweak.diff for tweak in participation.tweaks.filter(pool=self).all())
|
||||
|
||||
async def aaverage(self, participation):
|
||||
return sum([passage.average(participation) async for passage in self.passages.all()]) \
|
||||
return self.coeff * sum([passage.average(participation) async for passage in self.passages.all()]) \
|
||||
+ sum([tweak.diff async for tweak in participation.tweaks.filter(pool=self).all()])
|
||||
|
||||
def get_absolute_url(self):
|
||||
|
@ -674,7 +674,7 @@ class TestPayment(TestCase):
|
||||
response = self.client.post(reverse('registration:update_payment', args=(payment.pk,)),
|
||||
data={'type': "bank_transfer",
|
||||
'additional_information': "This is a bank transfer",
|
||||
'receipt': open("tfjm/static/Fiche_sanitaire.pdf", "rb")})
|
||||
'receipt': open("tfjm/static/tfjm/Fiche_sanitaire.pdf", "rb")})
|
||||
self.assertRedirects(response, reverse('participation:team_detail', args=(self.team.pk,)), 302, 200)
|
||||
payment.refresh_from_db()
|
||||
self.assertIsNone(payment.valid)
|
||||
@ -735,7 +735,7 @@ class TestPayment(TestCase):
|
||||
response = self.client.post(reverse('registration:update_payment', args=(payment.pk,)),
|
||||
data={'type': "scholarship",
|
||||
'additional_information': "I don't have to pay because I have a scholarship",
|
||||
'receipt': open("tfjm/static/Fiche_sanitaire.pdf", "rb")})
|
||||
'receipt': open("tfjm/static/tfjm/Fiche_sanitaire.pdf", "rb")})
|
||||
self.assertRedirects(response, reverse('participation:team_detail', args=(self.team.pk,)), 302, 200)
|
||||
payment.refresh_from_db()
|
||||
self.assertIsNone(payment.valid)
|
||||
|
@ -711,6 +711,7 @@ class TournamentExportCSVView(VolunteerMixin, DetailView):
|
||||
'Adresse': registration.address,
|
||||
'Code postal': registration.zip_code,
|
||||
'Ville': registration.city,
|
||||
'Pays': registration.country,
|
||||
'Téléphone': registration.phone_number,
|
||||
'Classe': registration.get_student_class_display() if registration.is_student
|
||||
else registration.last_degree,
|
||||
|
@ -106,9 +106,10 @@ class StudentRegistrationForm(forms.ModelForm):
|
||||
|
||||
class Meta:
|
||||
model = StudentRegistration
|
||||
fields = ('team', 'student_class', 'birth_date', 'gender', 'address', 'zip_code', 'city', 'phone_number',
|
||||
'school', 'health_issues', 'housing_constraints', 'responsible_name', 'responsible_phone',
|
||||
'responsible_email', 'give_contact_to_animath', 'email_confirmed',)
|
||||
fields = ('team', 'student_class', 'birth_date', 'gender', 'address', 'zip_code', 'city', 'country',
|
||||
'phone_number', 'school', 'health_issues', 'housing_constraints',
|
||||
'responsible_name', 'responsible_phone', 'responsible_email', 'give_contact_to_animath',
|
||||
'email_confirmed',)
|
||||
|
||||
|
||||
class PhotoAuthorizationForm(forms.ModelForm):
|
||||
@ -249,7 +250,7 @@ class CoachRegistrationForm(forms.ModelForm):
|
||||
"""
|
||||
class Meta:
|
||||
model = CoachRegistration
|
||||
fields = ('team', 'gender', 'address', 'zip_code', 'city', 'phone_number',
|
||||
fields = ('team', 'gender', 'address', 'zip_code', 'city', 'country', 'phone_number',
|
||||
'last_degree', 'professional_activity', 'health_issues', 'housing_constraints',
|
||||
'give_contact_to_animath', 'email_confirmed',)
|
||||
|
||||
|
@ -0,0 +1,23 @@
|
||||
# Generated by Django 5.0.6 on 2024-06-07 12:46
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
(
|
||||
"registration",
|
||||
"0013_participantregistration_photo_authorization_final_and_more",
|
||||
),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name="participantregistration",
|
||||
name="country",
|
||||
field=models.CharField(
|
||||
default="France", max_length=255, verbose_name="country"
|
||||
),
|
||||
),
|
||||
]
|
@ -183,6 +183,12 @@ class ParticipantRegistration(Registration):
|
||||
verbose_name=_("city"),
|
||||
)
|
||||
|
||||
country = models.CharField(
|
||||
max_length=255,
|
||||
verbose_name=_("country"),
|
||||
default="France",
|
||||
)
|
||||
|
||||
phone_number = PhoneNumberField(
|
||||
verbose_name=_("phone number"),
|
||||
blank=True,
|
||||
|
@ -48,7 +48,10 @@
|
||||
<dd class="col-sm-6">{{ user_object.registration.get_gender_display }}</dd>
|
||||
|
||||
<dt class="col-sm-6 text-sm-end">{% trans "Address:" %}</dt>
|
||||
<dd class="col-sm-6">{{ user_object.registration.address }}, {{ user_object.registration.zip_code|stringformat:'05d' }} {{ user_object.registration.city }}</dd>
|
||||
<dd class="col-sm-6">
|
||||
{{ user_object.registration.address }},
|
||||
{{ user_object.registration.zip_code|stringformat:'05d' }} {{ user_object.registration.city }} ({{ user_object.registration.country }})
|
||||
</dd>
|
||||
|
||||
<dt class="col-sm-6 text-sm-end">{% trans "Phone number:" %}</dt>
|
||||
<dd class="col-sm-6">{{ user_object.registration.phone_number }}</dd>
|
||||
|
@ -333,7 +333,7 @@ class TestRegistration(TestCase):
|
||||
|
||||
response = self.client.post(reverse(f"registration:upload_user_{auth_type}",
|
||||
args=(self.student.registration.pk,)), data={
|
||||
auth_type: open("tfjm/static/Fiche_sanitaire.pdf", "rb"),
|
||||
auth_type: open("tfjm/static/tfjm/Fiche_sanitaire.pdf", "rb"),
|
||||
})
|
||||
self.assertRedirects(response, reverse("registration:user_detail", args=(self.student.pk,)), 302, 200)
|
||||
|
||||
@ -356,7 +356,7 @@ class TestRegistration(TestCase):
|
||||
old_authoratization = self.student.registration.photo_authorization.path
|
||||
response = self.client.post(reverse("registration:upload_user_photo_authorization",
|
||||
args=(self.student.registration.pk,)), data=dict(
|
||||
photo_authorization=open("tfjm/static/Fiche_sanitaire.pdf", "rb"),
|
||||
photo_authorization=open("tfjm/static/tfjm/Fiche_sanitaire.pdf", "rb"),
|
||||
))
|
||||
self.assertRedirects(response, reverse("registration:user_detail", args=(self.student.pk,)), 302, 200)
|
||||
self.assertFalse(os.path.isfile(old_authoratization))
|
||||
|
7
tfjm/context_processors.py
Normal file
7
tfjm/context_processors.py
Normal file
@ -0,0 +1,7 @@
|
||||
from django.conf import settings
|
||||
|
||||
|
||||
def tfjm_context(request):
|
||||
return {
|
||||
'TFJM_APP': settings.TFJM_APP,
|
||||
}
|
@ -118,6 +118,7 @@ TEMPLATES = [
|
||||
'django.template.context_processors.request',
|
||||
'django.contrib.auth.context_processors.auth',
|
||||
'django.contrib.messages.context_processors.messages',
|
||||
'tfjm.context_processors.tfjm_context',
|
||||
],
|
||||
},
|
||||
},
|
||||
@ -306,6 +307,12 @@ else:
|
||||
}
|
||||
}
|
||||
|
||||
CHANNEL_LAYERS = {
|
||||
"default": {
|
||||
"BACKEND": "channels.layers.InMemoryChannelLayer"
|
||||
}
|
||||
}
|
||||
|
||||
# Custom phone number format
|
||||
PHONENUMBER_DB_FORMAT = 'NATIONAL'
|
||||
PHONENUMBER_DEFAULT_REGION = 'FR'
|
||||
@ -333,16 +340,6 @@ GOOGLE_SERVICE_CLIENT = {
|
||||
NOTES_DRIVE_FOLDER_ID = os.getenv("NOTES_DRIVE_FOLDER_ID", "CHANGE_ME_IN_ENV_SETTINGS")
|
||||
|
||||
# Custom parameters
|
||||
PROBLEMS = [
|
||||
"Triominos",
|
||||
"Rassemblements mathématiques",
|
||||
"Tournoi de ping-pong",
|
||||
"Dépollution de la Seine",
|
||||
"Électron libre",
|
||||
"Pièces truquées",
|
||||
"Drôles de cookies",
|
||||
"Création d'un jeu",
|
||||
]
|
||||
FORBIDDEN_TRIGRAMS = [
|
||||
"BIT",
|
||||
"CNO",
|
||||
@ -361,11 +358,7 @@ FORBIDDEN_TRIGRAMS = [
|
||||
"SEX",
|
||||
]
|
||||
|
||||
CHANNEL_LAYERS = {
|
||||
"default": {
|
||||
"BACKEND": "channels.layers.InMemoryChannelLayer"
|
||||
}
|
||||
}
|
||||
TFJM_APP = os.getenv("TFJM_APP", "TFJM") # Change to ETEAM for the ETEAM tournament
|
||||
|
||||
if TFJM_STAGE == "prod": # pragma: no cover
|
||||
from .settings_prod import * # noqa: F401,F403
|
||||
@ -376,3 +369,38 @@ try:
|
||||
from .settings_local import * # noqa: F401,F403
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
if TFJM_APP == "TFJM":
|
||||
TEAM_CODE_LENGTH = 3
|
||||
RECOMMENDED_SOLUTIONS_COUNT = 5
|
||||
NB_ROUNDS = 2
|
||||
|
||||
PROBLEMS = [
|
||||
"Triominos",
|
||||
"Rassemblements mathématiques",
|
||||
"Tournoi de ping-pong",
|
||||
"Dépollution de la Seine",
|
||||
"Électron libre",
|
||||
"Pièces truquées",
|
||||
"Drôles de cookies",
|
||||
"Création d'un jeu",
|
||||
]
|
||||
elif TFJM_APP == "ETEAM":
|
||||
TEAM_CODE_LENGTH = 4
|
||||
RECOMMENDED_SOLUTIONS_COUNT = 6
|
||||
NB_ROUNDS = 3
|
||||
|
||||
PROBLEMS = [
|
||||
"Exploring Flatland",
|
||||
"A Mazing Hive",
|
||||
"Coin tossing",
|
||||
"The rainbow bridge",
|
||||
"Arithmetic and shopping",
|
||||
"A fence for the goats",
|
||||
"Generalized Tic-Tac-Toe",
|
||||
"Polyhedral construction",
|
||||
"Landing a probe",
|
||||
"Catching the rabbit",
|
||||
]
|
||||
else:
|
||||
raise ValueError(f"Unknown app: {TFJM_APP}")
|
||||
|
@ -7,7 +7,9 @@ import os
|
||||
DEBUG = False
|
||||
|
||||
# Mandatory !
|
||||
ALLOWED_HOSTS = ['inscription.tfjm.org', 'inscriptions.tfjm.org', 'plateforme.tfjm.org']
|
||||
# TODO ETEAM Meilleur support, et meilleurs DNS surtout
|
||||
ALLOWED_HOSTS = ['inscription.tfjm.org', 'inscriptions.tfjm.org', 'plateforme.tfjm.org',
|
||||
'register.eteam.tfjm.org', 'registration.eteam.tfjm.org', 'platform.eteam.tfjm.org']
|
||||
|
||||
# Emails
|
||||
EMAIL_BACKEND = 'mailer.backend.DbBackend'
|
||||
|
BIN
tfjm/static/tfjm/img/eteam.png
Normal file
BIN
tfjm/static/tfjm/img/eteam.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 15 KiB |
@ -9,9 +9,11 @@
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<title>
|
||||
{% block title %}{{ title }}{% endblock title %} - Plateforme du TFJM²
|
||||
{# TODO ETEAM Plus d'uniformité #}
|
||||
{% block title %}{{ title }}{% endblock title %} - {% trans "ETEAM Platform" %}
|
||||
</title>
|
||||
<meta name="description" content="Plateforme d'inscription au TFJM².">
|
||||
{# TODO ETEAM Plus d'uniformité #}
|
||||
<meta name="description" content="{% trans "Registration platform to the ETEAM." %}">
|
||||
|
||||
{# Favicon #}
|
||||
<link rel="shortcut icon" href="{% static "favicon.ico" %}">
|
||||
|
@ -1,68 +0,0 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<div class="jumbotron p-5">
|
||||
<div class="row text-center">
|
||||
<h1 class="display-4">
|
||||
Bienvenue sur le site d'inscription au <a href="https://tfjm.org/" target="_blank">𝕋𝔽𝕁𝕄²</a> !
|
||||
</h1>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row p-5">
|
||||
<div class="col-sm">
|
||||
<h3>
|
||||
Tu souhaites participer au 𝕋𝔽𝕁𝕄² ?
|
||||
<br/>
|
||||
Ton équipe est déjà formée ?
|
||||
</h3>
|
||||
</div>
|
||||
<div class="col-sm text-sm-end">
|
||||
<div class="btn-group-vertical">
|
||||
<a class="btn btn-primary btn-lg" href="{% url "registration:signup" %}" role="button">Inscris-toi maintenant !</a>
|
||||
<a class="btn btn-light text-dark btn-lg" href="{% url "login" %}" role="button">J'ai déjà un compte</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="jumbotron p-5 border rounded-5">
|
||||
<h5 class="display-4">Comment ça marche ?</h5>
|
||||
<p>
|
||||
Pour participer au 𝕋𝔽𝕁𝕄², il suffit de créer un compte sur la rubrique <strong><a href="{% url "registration:signup" %}">Inscription</a></strong>.
|
||||
Vous devrez ensuite confirmer votre adresse e-mail.
|
||||
</p>
|
||||
|
||||
<p class="text-justify">
|
||||
Vous pouvez accéder à votre compte via la rubrique <strong><a href="{% url "login" %}">Connexion</a></strong>.
|
||||
Une fois connecté⋅e, vous pourrez créer une équipe ou en rejoindre une déjà créée par l'un⋅e de vos camarades
|
||||
via un code d'accès qui vous aura été transmis. Vous serez ensuite invité⋅e à soumettre une autorisation de droit à l'image,
|
||||
indispensable au bon déroulement du 𝕋𝔽𝕁𝕄². Une fois que votre équipe comporte au moins 4 participant⋅es (maximum 6)
|
||||
et un⋅e encadrant⋅e, vous pourrez demander à valider votre équipe pour être apte à travailler sur les problèmes de votre choix.
|
||||
</p>
|
||||
|
||||
<h2>Je ne trouve pas d'équipe, aidez-moi !</h2>
|
||||
|
||||
|
||||
<p class="text-justify">
|
||||
Vous pouvez nous contacter à l'adresse <a href="mailto:contact@tfjm.org">contact@tfjm.org</a> pour que nous
|
||||
puissions vous aider à vous mettre en relation avec d'autres participant⋅es qui cherchent également une équipe.
|
||||
</p>
|
||||
|
||||
<h2>J'ai une question</h2>
|
||||
|
||||
<p class="text-justify">
|
||||
N'hésitez pas à consulter la <a href="/doc/" target="_blank">documentation</a> du site, pour vérifier si
|
||||
la réponse ne s'y trouve pas déjà. Référez-vous également bien sûr au
|
||||
<a href="https://tfjm.org/reglement/" target="_blank">règlement du 𝕋𝔽𝕁𝕄²</a>.
|
||||
Pour toute autre question, n'hésitez pas à nous contacter par mail à l'adresse
|
||||
<a href="mailto:contact@tfjm.org">
|
||||
contact@tfjm.org
|
||||
</a>.
|
||||
</p>
|
||||
|
||||
<div class="alert alert-warning">
|
||||
<strong>Attention aux dates !</strong> Si vous ne finalisez pas votre inscription dans le délai indiqué, vous
|
||||
ne pourrez malheureusement pas participer au 𝕋𝔽𝕁𝕄².
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
67
tfjm/templates/index_eteam.html
Normal file
67
tfjm/templates/index_eteam.html
Normal file
@ -0,0 +1,67 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
|
||||
{% block content %}
|
||||
<div class="jumbotron p-5">
|
||||
<div class="row text-center">
|
||||
<h1 class="display-4">
|
||||
{% trans "Welcome onto the registration site of the" %}
|
||||
<a href="https://eteam.tfjm.org/" target="_blank">ETEAM</a> !
|
||||
</h1>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row p-5">
|
||||
<div class="col-sm">
|
||||
<h3>
|
||||
{% trans "You want to participate to the ETEAM ?" %}
|
||||
<br/>
|
||||
{% trans "Your team is selected and already complete?" %}
|
||||
</h3>
|
||||
</div>
|
||||
<div class="col-sm text-sm-end">
|
||||
<div class="btn-group-vertical">
|
||||
<a class="btn btn-primary btn-lg" href="{% url "registration:signup" %}" role="button">{% trans "Register now!" %}</a>
|
||||
<a class="btn btn-light text-dark btn-lg" href="{% url "login" %}" role="button">{% trans "I already have an account" %}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="jumbotron p-5 border rounded-5">
|
||||
<h5 class="display-4">{% trans "How does it work?" %}</h5>
|
||||
<p>
|
||||
{% url "registration:signup" as signup_url %}
|
||||
{% blocktrans trimmed %}
|
||||
To participate to the ETEAM, you must be selected by your national organization.
|
||||
If so, you just need to create an account on the <strong><a href="{{ signup_url }}">Registration</a></strong> page.
|
||||
You will then have to confirm your email address.
|
||||
{% endblocktrans %}
|
||||
</p>
|
||||
|
||||
<p class="text-justify">
|
||||
{% url "login" as login_url %}
|
||||
{% blocktrans trimmed %}
|
||||
You can access your account via the <strong><a href="{{ login_url }}">Login</a></strong> page.
|
||||
Once logged in, you will be able to create a team or join one already created by one of your comrades
|
||||
via an access code that will have been transmitted to you. You will then be invited to submit a right to image authorization,
|
||||
essential for the smooth running of the ETEAM. Once your team has at least 4 participants (maximum 6)
|
||||
and a supervisor, you can request to validate your team to be able to work on the problems of your choice.
|
||||
{% endblocktrans %}
|
||||
</p>
|
||||
|
||||
<h2>{% trans "I have a question" %}</h2>
|
||||
|
||||
<p class="text-justify">
|
||||
{% blocktrans trimmed %}
|
||||
Do not hesitate to consult the <a href="/doc/" target="_blank">documentation</a> of the site, to check if
|
||||
the answer is not already there. Also refer of course to the
|
||||
<a href="https://eteam.tfjm.org/rules/" target="_blank">𝕋𝔽𝕁𝕄² rules</a>.
|
||||
For any other question, do not hesitate to contact us by email at the address
|
||||
<a href="mailto:eteam_moc@proton.me ">
|
||||
eteam_moc@proton.me
|
||||
</a>.
|
||||
{% endblocktrans %}
|
||||
</p>
|
||||
</div>
|
||||
{% endblock %}
|
81
tfjm/templates/index_tfjm.html
Normal file
81
tfjm/templates/index_tfjm.html
Normal file
@ -0,0 +1,81 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
|
||||
{% block content %}
|
||||
<div class="jumbotron p-5">
|
||||
<div class="row text-center">
|
||||
<h1 class="display-4">
|
||||
{% trans "Welcome onto the registration site of the" %}
|
||||
<a href="https://tfjm.org/" target="_blank">𝕋𝔽𝕁𝕄²</a> !
|
||||
</h1>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row p-5">
|
||||
<div class="col-sm">
|
||||
<h3>
|
||||
{% trans "You want to participate to the 𝕋𝔽𝕁𝕄² ?" %}
|
||||
<br/>
|
||||
{% trans "Your team is already complete?" %}
|
||||
</h3>
|
||||
</div>
|
||||
<div class="col-sm text-sm-end">
|
||||
<div class="btn-group-vertical">
|
||||
<a class="btn btn-primary btn-lg" href="{% url "registration:signup" %}" role="button">{% trans "Register now!" %}</a>
|
||||
<a class="btn btn-light text-dark btn-lg" href="{% url "login" %}" role="button">{% trans "I already have an account" %}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="jumbotron p-5 border rounded-5">
|
||||
<h5 class="display-4">{% trans "How does it work?" %}</h5>
|
||||
<p>
|
||||
{% url "registration:signup" as signup_url %}
|
||||
{% blocktrans trimmed %}
|
||||
To participate to the 𝕋𝔽𝕁𝕄², you just need to create an account on the <strong><a href="{{ signup_url }}">Registration</a></strong> page.
|
||||
You will then have to confirm your email address.
|
||||
{% endblocktrans %}
|
||||
</p>
|
||||
|
||||
<p class="text-justify">
|
||||
{% url "login" as login_url %}
|
||||
{% blocktrans trimmed %}
|
||||
You can access your account via the <strong><a href="{{ login_url }}">Login</a></strong> page.
|
||||
Once logged in, you will be able to create a team or join one already created by one of your comrades
|
||||
via an access code that will have been transmitted to you. You will then be invited to submit a right to image authorization,
|
||||
essential for the smooth running of the 𝕋𝔽𝕁𝕄². Once your team has at least 4 participants (maximum 6)
|
||||
and a supervisor, you can request to validate your team to be able to work on the problems of your choice.
|
||||
{% endblocktrans %}
|
||||
</p>
|
||||
|
||||
<h2>{% trans "I can't find a team, help me!" %}</h2>
|
||||
|
||||
|
||||
<p class="text-justify">
|
||||
{% blocktrans trimmed %}
|
||||
You can contact us at the address <a href="mailto:contact@tfjm.org">contact@tfjm.org</a> so that we
|
||||
can help you get in touch with other participants who are also looking for a team.
|
||||
{% endblocktrans %}
|
||||
</p>
|
||||
|
||||
<h2>{% trans "I have a question" %}</h2>
|
||||
|
||||
<p class="text-justify">
|
||||
{% blocktrans trimmed %}
|
||||
Do not hesitate to consult the <a href="/doc/" target="_blank">documentation</a> of the site, to check if
|
||||
the answer is not already there. Also refer of course to the
|
||||
<a href="https://tfjm.org/reglement/" target="_blank">𝕋𝔽𝕁𝕄² rules</a>.
|
||||
For any other question, do not hesitate to contact us by email at the address
|
||||
<a href="mailto:contact@tfjm.org">
|
||||
contact@tfjm.org
|
||||
</a>.
|
||||
{% endblocktrans %}
|
||||
</p>
|
||||
|
||||
<div class="alert alert-warning">
|
||||
<strong>{% trans "Save the dates!" %}</strong>
|
||||
{% trans "If you don't end your registration by the indicated deadline, you will unfortunately not be able to participate in the 𝕋𝔽𝕁𝕄²." %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
@ -2,8 +2,10 @@
|
||||
|
||||
<nav class="navbar navbar-expand-lg fixed-navbar shadow-sm">
|
||||
<div class="container-fluid">
|
||||
<a class="navbar-brand" href="https://tfjm.org/">
|
||||
<img src="{% static "tfjm/img/tfjm.svg" %}" style="height: 2em;" alt="Logo TFJM²" id="navbar-logo">
|
||||
{# TODO ETEAM Plus d'uniformité #}
|
||||
<a class="navbar-brand" href="https://eteam.tfjm.org/">
|
||||
{# TODO ETEAM Plus d'uniformité #}
|
||||
<img src="{% static "tfjm/img/eteam.png" %}" style="height: 2em;" alt="Logo ETEAM" id="navbar-logo">
|
||||
</a>
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse"
|
||||
data-bs-target="#navbarNavDropdown"
|
||||
|
@ -28,7 +28,8 @@ from registration.views import HealthSheetView, ParentalAuthorizationView, Photo
|
||||
from .views import AdminSearchView
|
||||
|
||||
urlpatterns = [
|
||||
path('', TemplateView.as_view(template_name="index.html"), name='index'),
|
||||
# TODO ETEAM Rendre ça plus joli
|
||||
path('', TemplateView.as_view(template_name=f"index_{settings.TFJM_APP.lower()}.html"), name='index'),
|
||||
path('about/', TemplateView.as_view(template_name="about.html"), name='about'),
|
||||
path('i18n/', include('django.conf.urls.i18n')),
|
||||
path('admin/doc/', include('django.contrib.admindocs.urls')),
|
||||
|
Loading…
Reference in New Issue
Block a user