supprimer allocation_list.pt, appel de allocation_edit.pt depuis home

This commit is contained in:
2018-08-03 22:22:50 +02:00
parent b6c2efd0aa
commit 46d15f5a7f
6 changed files with 14 additions and 109 deletions

View File

@@ -85,6 +85,8 @@ def home(request):
donut_actuel=[]
donut_actuel.append(('Allocation actuelle', 'Pourcent'))
# calculer % total
total = 0
for item in items:
# construire la liste pour donut cible
d = (item.classe, item.pc_cible)
@@ -92,6 +94,11 @@ def home(request):
# construire la liste pour donut actuel
d = (item.classe, int(item.pc_atteint * 10))
donut_actuel.append(d)
# totaliser les pourcentages
total += item.pc_cible
if total <> 100:
message = u'Attention, le total de votre répartition cible est incorrect : %s.' % total
# lire les actifs
actifs = get_actifs(request, '0')