forked from DGNum/gestioCOF
Merge branch 'kerl/bds-buro' into 'master'
petite mise à jour de BDSProfile See merge request klub-dev-ens/gestioCOF!396
This commit is contained in:
commit
c1449d50ce
3 changed files with 61 additions and 2 deletions
22
bds/migrations/0003_staff_permission.py
Normal file
22
bds/migrations/0003_staff_permission.py
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
# Generated by Django 2.2.8 on 2019-12-20 22:48
|
||||||
|
|
||||||
|
from django.db import migrations
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
("bds", "0002_bds_group"),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterModelOptions(
|
||||||
|
name="bdsprofile",
|
||||||
|
options={
|
||||||
|
"permissions": (("is_team", "est membre du burô"),),
|
||||||
|
"verbose_name": "Profil BDS",
|
||||||
|
"verbose_name_plural": "Profils BDS",
|
||||||
|
},
|
||||||
|
),
|
||||||
|
migrations.RemoveField(model_name="bdsprofile", name="is_buro",),
|
||||||
|
]
|
34
bds/migrations/0004_is_member_cotiz_type.py
Normal file
34
bds/migrations/0004_is_member_cotiz_type.py
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
# Generated by Django 2.2.8 on 2019-12-22 10:20
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
("bds", "0003_staff_permission"),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AddField(
|
||||||
|
model_name="bdsprofile",
|
||||||
|
name="cotisation_type",
|
||||||
|
field=models.CharField(
|
||||||
|
choices=[
|
||||||
|
("ETU", "Étudiant"),
|
||||||
|
("NOR", "Normalien"),
|
||||||
|
("EXT", "Extérieur"),
|
||||||
|
("ARC", "Archicube"),
|
||||||
|
],
|
||||||
|
default="Normalien",
|
||||||
|
max_length=9,
|
||||||
|
verbose_name="type de cotisation",
|
||||||
|
),
|
||||||
|
preserve_default=False,
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name="bdsprofile",
|
||||||
|
name="is_member",
|
||||||
|
field=models.BooleanField(default=False, verbose_name="adhérent⋅e du BDS"),
|
||||||
|
),
|
||||||
|
]
|
|
@ -63,7 +63,6 @@ class BDSProfile(models.Model):
|
||||||
)
|
)
|
||||||
|
|
||||||
mails_bds = models.BooleanField(_("recevoir les mails 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(
|
certificate_file = models.FileField(
|
||||||
|
@ -79,17 +78,21 @@ class BDSProfile(models.Model):
|
||||||
_("numéro FFSU"), max_length=50, blank=True, null=True
|
_("numéro FFSU"), max_length=50, blank=True, null=True
|
||||||
)
|
)
|
||||||
|
|
||||||
|
is_member = models.BooleanField(_("adhérent⋅e du BDS"), default=False)
|
||||||
cotisation_period = models.CharField(
|
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(
|
registration_date = models.DateField(
|
||||||
auto_now_add=True, verbose_name=_("date d'inscription")
|
auto_now_add=True, verbose_name=_("date d'inscription")
|
||||||
)
|
)
|
||||||
|
cotisation_type = models.CharField(
|
||||||
|
_("type de cotisation"), choices=TYPE_COTIZ_CHOICES, max_length=9
|
||||||
|
)
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
verbose_name = _("Profil BDS")
|
verbose_name = _("Profil BDS")
|
||||||
verbose_name_plural = _("Profils BDS")
|
verbose_name_plural = _("Profils BDS")
|
||||||
|
permissions = (("is_team", _("est membre du burô")),)
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return self.user.username
|
return self.user.username
|
||||||
|
|
Loading…
Reference in a new issue