[WIP] Multiples modifications dans l'app People
This commit is contained in:
parent
f089b06f54
commit
059b3c32bf
|
@ -96,10 +96,10 @@ class GymnastForm(forms.ModelForm):
|
|||
"city",
|
||||
"phone",
|
||||
"gsm",
|
||||
"gsm_mother",
|
||||
"email_mother",
|
||||
"gsm_father",
|
||||
"email_father",
|
||||
"gsm_main_responsible",
|
||||
"email_main_responsible",
|
||||
"gsm_second_responsible",
|
||||
"email_second_responsible",
|
||||
"orientation",
|
||||
"picture",
|
||||
"content",
|
||||
|
@ -117,10 +117,10 @@ class GymnastForm(forms.ModelForm):
|
|||
"phone": forms.TextInput(attrs={"class": "form-control"}),
|
||||
"gsm": forms.TextInput(attrs={"class": "form-control"}),
|
||||
"email": forms.EmailInput(attrs={"class": "form-control"}),
|
||||
"gsm_mother": forms.TextInput(attrs={"class": "form-control"}),
|
||||
"email_mother": forms.EmailInput(attrs={"class": "form-control"}),
|
||||
"gsm_father": forms.TextInput(attrs={"class": "form-control"}),
|
||||
"email_father": forms.EmailInput(attrs={"class": "form-control"}),
|
||||
"gsm_main_responsible": forms.TextInput(attrs={"class": "form-control"}),
|
||||
"email_main_responsible": forms.EmailInput(attrs={"class": "form-control"}),
|
||||
"gsm_second_responsible": forms.TextInput(attrs={"class": "form-control"}),
|
||||
"email_second_responsible": forms.EmailInput(attrs={"class": "form-control"}),
|
||||
# "is_active": forms.CheckboxInput(
|
||||
# attrs={
|
||||
# "class": "bootstrap-switch mt-0",
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
# Generated by Django 3.2.2 on 2021-06-21 18:04
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('people', '0017_alter_gymnast_user'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RenameField(
|
||||
model_name='gymnast',
|
||||
old_name='fedid',
|
||||
new_name='federation_id',
|
||||
),
|
||||
migrations.RenameField(
|
||||
model_name='gymnast',
|
||||
old_name='have_routine',
|
||||
new_name='routine',
|
||||
),
|
||||
]
|
|
@ -0,0 +1,43 @@
|
|||
# Generated by Django 3.2.2 on 2021-06-21 18:09
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('people', '0018_auto_20210621_1804'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RenameField(
|
||||
model_name='gymnast',
|
||||
old_name='cando',
|
||||
new_name='can_do',
|
||||
),
|
||||
migrations.RenameField(
|
||||
model_name='gymnast',
|
||||
old_name='email_father',
|
||||
new_name='email_main_responsible',
|
||||
),
|
||||
migrations.RenameField(
|
||||
model_name='gymnast',
|
||||
old_name='email_mother',
|
||||
new_name='email_second_responsible',
|
||||
),
|
||||
migrations.RenameField(
|
||||
model_name='gymnast',
|
||||
old_name='gsm_mother',
|
||||
new_name='gsm_main_responsible',
|
||||
),
|
||||
migrations.RenameField(
|
||||
model_name='gymnast',
|
||||
old_name='gsm_father',
|
||||
new_name='gsm_second_responsible',
|
||||
),
|
||||
migrations.RenameField(
|
||||
model_name='gymnast',
|
||||
old_name='haveToDo',
|
||||
new_name='have_to_do',
|
||||
),
|
||||
]
|
|
@ -81,17 +81,17 @@ class Gymnast(Markdownizable):
|
|||
max_length=9, null=True, blank=True, verbose_name="Phond"
|
||||
)
|
||||
gsm = models.CharField(max_length=10, null=True, blank=True)
|
||||
fedid = models.CharField(
|
||||
federation_id = models.CharField(
|
||||
max_length=10, null=True, blank=True, verbose_name="Federation ID"
|
||||
)
|
||||
gsm_mother = models.CharField(
|
||||
gsm_main_responsible = models.CharField(
|
||||
max_length=10, null=True, blank=True, verbose_name="GSM mère"
|
||||
)
|
||||
email_mother = models.EmailField(max_length=255, null=True, blank=True)
|
||||
gsm_father = models.CharField(
|
||||
email_main_responsible = models.EmailField(max_length=255, null=True, blank=True)
|
||||
gsm_second_responsible= models.CharField(
|
||||
max_length=10, null=True, blank=True, verbose_name="GSM père"
|
||||
)
|
||||
email_father = models.EmailField(max_length=255, null=True, blank=True)
|
||||
email_second_responsible = models.EmailField(max_length=255, null=True, blank=True)
|
||||
orientation = models.PositiveSmallIntegerField(
|
||||
choices=ORIENTATION_CHOICES,
|
||||
null=True,
|
||||
|
@ -107,17 +107,17 @@ class Gymnast(Markdownizable):
|
|||
club = models.ForeignKey(
|
||||
"location.Club", null=True, on_delete=models.SET_NULL, related_name="gymnasts"
|
||||
)
|
||||
cando = models.ManyToManyField(
|
||||
can_do = models.ManyToManyField(
|
||||
"objective.Educative",
|
||||
through="CanDoRelation",
|
||||
related_name="isdoneby", # related_name to change
|
||||
)
|
||||
haveToDo = models.ManyToManyField(
|
||||
have_to_do = models.ManyToManyField(
|
||||
"objective.Educative",
|
||||
through="ToDoRelation",
|
||||
related_name="mustBeDoneBy", # related_name to change
|
||||
)
|
||||
have_routine = models.ManyToManyField(
|
||||
routine = models.ManyToManyField(
|
||||
"objective.Routine",
|
||||
through="GymnastHasRoutine",
|
||||
related_name="doneBy", # related_name to change
|
||||
|
|
Loading…
Reference in New Issue