Renaming ageBoy/ageGirl to age_boy/age_girl
This commit is contained in:
parent
8b9e61ed2d
commit
3b1862f9f6
|
@ -259,11 +259,11 @@ def routine_details(request, routineid):
|
||||||
if not skill_link.skill.is_competitive:
|
if not skill_link.skill.is_competitive:
|
||||||
is_competitive = False
|
is_competitive = False
|
||||||
|
|
||||||
if skill_link.skill.ageBoy is not None and skill_link.skill.ageBoy > age_boy:
|
if skill_link.skill.age_boy is not None and skill_link.skill.age_boy > age_boy:
|
||||||
age_boy = skill_link.skill.ageBoy
|
age_boy = skill_link.skill.age_boy
|
||||||
|
|
||||||
if skill_link.skill.ageGirl is not None and skill_link.skill.ageGirl > age_girl:
|
if skill_link.skill.age_girl is not None and skill_link.skill.age_girl > age_girl:
|
||||||
age_girl = skill_link.skill.ageGirl
|
age_girl = skill_link.skill.age_girl
|
||||||
|
|
||||||
if routine.skill_links.all().count() != 10:
|
if routine.skill_links.all().count() != 10:
|
||||||
is_competitive = False
|
is_competitive = False
|
||||||
|
@ -276,11 +276,11 @@ def routine_details(request, routineid):
|
||||||
if routine.rank is None or routine.rank < rank:
|
if routine.rank is None or routine.rank < rank:
|
||||||
routine.rank = rank
|
routine.rank = rank
|
||||||
|
|
||||||
if routine.ageBoy is None or routine.ageBoy < age_boy:
|
if routine.age_boy is None or routine.age_boy < age_boy:
|
||||||
routine.ageBoy = age_boy
|
routine.age_boy = age_boy
|
||||||
|
|
||||||
if routine.ageGirl is None or routine.ageGirl < age_girl:
|
if routine.age_girl is None or routine.age_girl < age_girl:
|
||||||
routine.ageGirl = age_girl
|
routine.age_girl = age_girl
|
||||||
|
|
||||||
routine.is_competitive = is_competitive
|
routine.is_competitive = is_competitive
|
||||||
|
|
||||||
|
|
|
@ -224,11 +224,11 @@ def display_stats(gymnast):
|
||||||
context.update(__getInformationsFromRank(gymnast, gymnast_known_skills))
|
context.update(__getInformationsFromRank(gymnast, gymnast_known_skills))
|
||||||
|
|
||||||
if gymnast.gender:
|
if gymnast.gender:
|
||||||
context["skillByAge"] = Skill.objects.filter(ageGirl__lte=gymnast.age).exclude(
|
context["skillByAge"] = Skill.objects.filter(age_girl__lte=gymnast.age).exclude(
|
||||||
cando__gymnast=gymnast.id
|
cando__gymnast=gymnast.id
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
context["skillByAge"] = Skill.objects.filter(ageBoy__lte=gymnast.age).exclude(
|
context["skillByAge"] = Skill.objects.filter(age_boy__lte=gymnast.age).exclude(
|
||||||
cando__gymnast=gymnast.id
|
cando__gymnast=gymnast.id
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -257,11 +257,11 @@ def display_level(gymnast):
|
||||||
# context.update(__getInformationsFromRank(gymnast, gymnast_known_skills))
|
# context.update(__getInformationsFromRank(gymnast, gymnast_known_skills))
|
||||||
|
|
||||||
if gymnast.gender:
|
if gymnast.gender:
|
||||||
context["skillByAge"] = Skill.objects.filter(ageGirl__lte=gymnast.age).exclude(
|
context["skillByAge"] = Skill.objects.filter(age_girl__lte=gymnast.age).exclude(
|
||||||
cando__gymnast=gymnast.id
|
cando__gymnast=gymnast.id
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
context["skillByAge"] = Skill.objects.filter(ageBoy__lte=gymnast.age).exclude(
|
context["skillByAge"] = Skill.objects.filter(age_boy__lte=gymnast.age).exclude(
|
||||||
cando__gymnast=gymnast.id
|
cando__gymnast=gymnast.id
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -406,11 +406,11 @@ def gymnast_display_stats(request, gymnastid):
|
||||||
context.update(__getInformationsFromRank(gymnast, gymnast_known_skills))
|
context.update(__getInformationsFromRank(gymnast, gymnast_known_skills))
|
||||||
|
|
||||||
if gymnast.gender:
|
if gymnast.gender:
|
||||||
context["skillByAge"] = Skill.objects.filter(ageGirl__lte=gymnast.age).exclude(
|
context["skillByAge"] = Skill.objects.filter(age_girl__lte=gymnast.age).exclude(
|
||||||
cando__gymnast=gymnast.id
|
cando__gymnast=gymnast.id
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
context["skillByAge"] = Skill.objects.filter(ageBoy__lte=gymnast.age).exclude(
|
context["skillByAge"] = Skill.objects.filter(age_boy__lte=gymnast.age).exclude(
|
||||||
cando__gymnast=gymnast.id
|
cando__gymnast=gymnast.id
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -438,11 +438,11 @@ def gymnast_display_level(request, gymnastid):
|
||||||
context["totalKnownSkill"] = gymnast_known_skills
|
context["totalKnownSkill"] = gymnast_known_skills
|
||||||
|
|
||||||
if gymnast.gender:
|
if gymnast.gender:
|
||||||
context["skillByAge"] = Skill.objects.filter(ageGirl__lte=gymnast.age).exclude(
|
context["skillByAge"] = Skill.objects.filter(age_girl__lte=gymnast.age).exclude(
|
||||||
cando__gymnast=gymnast.id
|
cando__gymnast=gymnast.id
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
context["skillByAge"] = Skill.objects.filter(ageBoy__lte=gymnast.age).exclude(
|
context["skillByAge"] = Skill.objects.filter(age_boy__lte=gymnast.age).exclude(
|
||||||
cando__gymnast=gymnast.id
|
cando__gymnast=gymnast.id
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,7 @@ $(function(){
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#id_ageBoy').keyup(function(){
|
$('#id_ageBoy').keyup(function(){
|
||||||
$('#id_ageGirl').val($('#id_ageBoy').val());
|
$('#id_age_girl').val($('#id_age_boy').val());
|
||||||
});
|
});
|
||||||
|
|
||||||
setDifficulty = function()
|
setDifficulty = function()
|
||||||
|
|
|
@ -38,8 +38,8 @@
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-3 text-center">Niveau : {{ routine.level }}</div>
|
<div class="col-3 text-center">Niveau : {{ routine.level }}</div>
|
||||||
<div class="col-3 text-center">Rank : {{ routine.rank }}</div>
|
<div class="col-3 text-center">Rank : {{ routine.rank }}</div>
|
||||||
<div class="col-3 text-center">Age Boy : {{ routine.ageBoy }}</div>
|
<div class="col-3 text-center">Age Boy : {{ routine.age_boy }}</div>
|
||||||
<div class="col-3 text-center">Age Girl : {{ routine.ageGirl }}</div>
|
<div class="col-3 text-center">Age Girl : {{ routine.age_girl }}</div>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -51,8 +51,8 @@
|
||||||
<td class="text-center">{{ routine.difficulty }}</td>
|
<td class="text-center">{{ routine.difficulty }}</td>
|
||||||
<td class="text-center">{{ routine.level }}</td>
|
<td class="text-center">{{ routine.level }}</td>
|
||||||
<td class="text-center">{{ routine.rank }}</td>
|
<td class="text-center">{{ routine.rank }}</td>
|
||||||
<td class="text-center">{{ routine.ageGirl }}</td>
|
<td class="text-center">{{ routine.age_girl }}</td>
|
||||||
<td class="text-center">{{ routine.ageBoy }}</td>
|
<td class="text-center">{{ routine.age_boy }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|
|
@ -43,8 +43,8 @@
|
||||||
<td class="text-center">{% if skill.is_competitive %}<i class="fa fa-check text-success" aria-hidden="true"></i>{% else %}<i class="fa fa-times text-danger" aria-hidden="true"></i>{% endif %}</td>
|
<td class="text-center">{% if skill.is_competitive %}<i class="fa fa-check text-success" aria-hidden="true"></i>{% else %}<i class="fa fa-times text-danger" aria-hidden="true"></i>{% endif %}</td>
|
||||||
<td class="text-center">{{ skill.level }}</td>
|
<td class="text-center">{{ skill.level }}</td>
|
||||||
<td class="text-center">{{ skill.rank }}</td>
|
<td class="text-center">{{ skill.rank }}</td>
|
||||||
<td class="text-center">{% if skill.ageBoy %}{{ skill.ageBoy }}{% endif %}</td>
|
<td class="text-center">{% if skill.age_boy %}{{ skill.age_boy }}{% endif %}</td>
|
||||||
<td class="text-center">{% if skill.ageGirl %}{{ skill.ageGirl }}{% endif %}</td>
|
<td class="text-center">{% if skill.age_girl %}{{ skill.age_girl }}{% endif %}</td>
|
||||||
<td class="text-center">{{ skill.notation }}</td>
|
<td class="text-center">{{ skill.notation }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
Loading…
Reference in New Issue