diff --git a/bds/migrations/0001_initial.py b/bds/migrations/0001_initial.py index b52027d4..e6fe5377 100644 --- a/bds/migrations/0001_initial.py +++ b/bds/migrations/0001_initial.py @@ -29,7 +29,7 @@ class Migration(migrations.Migration): ( "phone", models.CharField( - blank=True, max_length=20, verbose_name="Téléphone" + blank=True, max_length=20, verbose_name="téléphone" ), ), ( @@ -49,37 +49,37 @@ class Migration(migrations.Migration): ], default="1A", max_length=3, - verbose_name="Occupation", + verbose_name="occupation", ), ), ( "departement", models.CharField( - blank=True, max_length=50, verbose_name="Département" + blank=True, max_length=50, verbose_name="département" ), ), ( "birthdate", models.DateField( - blank=True, null=True, verbose_name="Date de naissance" + blank=True, null=True, verbose_name="date de naissance" ), ), ( "mails_bds", models.BooleanField( - default=False, verbose_name="Recevoir les mails du BDS" + default=False, verbose_name="recevoir les mails du BDS" ), ), ( "is_buro", models.BooleanField( - default=False, verbose_name="Membre du Burô du BDS" + default=False, verbose_name="membre du Burô du BDS" ), ), ( "has_certificate", models.BooleanField( - default=False, verbose_name="Certificat médical" + default=False, verbose_name="certificat médical" ), ), ( @@ -87,7 +87,7 @@ class Migration(migrations.Migration): models.FileField( blank=True, upload_to=bds.models.BDSProfile.get_certificate_filename, - verbose_name="Fichier de certificat médical", + verbose_name="fichier de certificat médical", ), ), ( @@ -96,13 +96,13 @@ class Migration(migrations.Migration): blank=True, max_length=50, null=True, - verbose_name="Numéro AS PSL", + verbose_name="numéro AS PSL", ), ), ( "FFSU_number", models.CharField( - blank=True, max_length=50, null=True, verbose_name="Numéro FFSU" + blank=True, max_length=50, null=True, verbose_name="numéro FFSU" ), ), ( @@ -116,13 +116,13 @@ class Migration(migrations.Migration): ], default="NO", max_length=3, - verbose_name="Inscription", + verbose_name="inscription", ), ), ( "registration_date", models.DateField( - auto_now_add=True, verbose_name="Date d'inscription" + auto_now_add=True, verbose_name="date d'inscription" ), ), ( diff --git a/bds/models.py b/bds/models.py index 0b73c964..f262ee26 100644 --- a/bds/models.py +++ b/bds/models.py @@ -3,7 +3,7 @@ from os.path import splitext from django.contrib.auth import get_user_model from django.db import models -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from shared.utils import choices_length @@ -46,48 +46,50 @@ class BDSProfile(models.Model): ) user = models.OneToOneField(User, on_delete=models.CASCADE, related_name="bds") - phone = models.CharField(_("Téléphone"), max_length=20, blank=True) + phone = models.CharField(_("téléphone"), max_length=20, blank=True) occupation = models.CharField( - _("Occupation"), + _("occupation"), default="1A", choices=OCCUPATION_CHOICES, max_length=choices_length(OCCUPATION_CHOICES), ) - departement = models.CharField(_("Département"), max_length=50, blank=True) + departement = models.CharField(_("département"), max_length=50, blank=True) birthdate = models.DateField( auto_now_add=False, auto_now=False, - verbose_name="Date de naissance", + verbose_name=_("date de naissance"), blank=True, null=True, ) - mails_bds = models.BooleanField(_("Recevoir les mails du BDS"), default=False) - is_buro = models.BooleanField(_("Membre du Burô du BDS"), default=False) + mails_bds = models.BooleanField(_("recevoir les mails du BDS"), default=False) + is_buro = models.BooleanField(_("membre du Burô du BDS"), default=False) - has_certificate = models.BooleanField(_("Certificat médical"), default=False) + has_certificate = models.BooleanField(_("certificat médical"), default=False) certificate_file = models.FileField( - _("Fichier de certificat médical"), + _("fichier de certificat médical"), upload_to=get_certificate_filename, blank=True, ) ASPSL_number = models.CharField( - "Numéro AS PSL", max_length=50, blank=True, null=True + _("numéro AS PSL"), max_length=50, blank=True, null=True + ) + FFSU_number = models.CharField( + _("numéro FFSU"), max_length=50, blank=True, null=True ) - FFSU_number = models.CharField("Numéro FFSU", max_length=50, blank=True, null=True) cotisation_period = models.CharField( - "Inscription", default="NO", choices=COTIZ_DURATION_CHOICES, max_length=3 + _("inscription"), default="NO", choices=COTIZ_DURATION_CHOICES, max_length=3 ) registration_date = models.DateField( - auto_now_add=True, verbose_name="Date d'inscription" + auto_now_add=True, verbose_name=_("date d'inscription") ) class Meta: - verbose_name = "Profil BDS" - verbose_name_plural = "Profils BDS" + verbose_name = _("Profil BDS") + verbose_name_plural = _("Profils BDS") def __str__(self): return self.user.username