rm cofprofile.num, add PEI / GRATIS
This commit is contained in:
parent
704731addd
commit
5ab090fa72
4 changed files with 36 additions and 26 deletions
|
@ -165,14 +165,10 @@ class RegistrationPassUserForm(RegistrationUserForm):
|
|||
|
||||
|
||||
class RegistrationCofProfileForm(forms.ModelForm):
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(RegistrationCofProfileForm, self).__init__(*args, **kwargs)
|
||||
self.fields['num'].widget.attrs['readonly'] = True
|
||||
|
||||
class Meta:
|
||||
model = CofProfile
|
||||
fields = [
|
||||
"num", "type_cotiz",
|
||||
"type_cotiz",
|
||||
"mailing", "mailing_bda", "mailing_bda_revente",
|
||||
]
|
||||
|
||||
|
|
|
@ -16,19 +16,22 @@ def get_cof_assoc():
|
|||
return Association.objects.get(name='COF')
|
||||
|
||||
|
||||
TYPE_COTIZ_CHOICES = (
|
||||
('etudiant', _("Normalien étudiant")),
|
||||
('normalien', _("Normalien élève")),
|
||||
('exterieur', _("Extérieur")),
|
||||
)
|
||||
|
||||
|
||||
class CofProfile(models.Model):
|
||||
COTIZ_ETUDIANT = "etudiant"
|
||||
COTIZ_NORMALIEN = "normalien"
|
||||
COTIZ_EXTE = "exterieur"
|
||||
COTIZ_GRATIS = "gratis"
|
||||
|
||||
TYPE_COTIZ_CHOICES = (
|
||||
(COTIZ_ETUDIANT, _("Normalien étudiant")),
|
||||
(COTIZ_NORMALIEN, _("Normalien élève")),
|
||||
(COTIZ_EXTE, _("Extérieur")),
|
||||
(COTIZ_GRATIS, _("Gratuit")),
|
||||
)
|
||||
|
||||
profile = models.OneToOneField(Profile,
|
||||
on_delete=models.CASCADE,
|
||||
related_name="cof")
|
||||
|
||||
num = models.IntegerField("Numéro d'adhérent", blank=True, default=0)
|
||||
type_cotiz = models.CharField(_("Type de cotisation"),
|
||||
default="normalien",
|
||||
choices=TYPE_COTIZ_CHOICES,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue