From c3f1d312f1ecec64ee077431dda04be4ba2ad500 Mon Sep 17 00:00:00 2001 From: alazo Date: Mon, 19 Feb 2018 07:51:50 +0100 Subject: [PATCH] Cancel_get_context_modif --- cms/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cms/views.py b/cms/views.py index 2d4f3f1..d4924ae 100644 --- a/cms/views.py +++ b/cms/views.py @@ -7,7 +7,7 @@ import os import tempfile from django.views.generic import ListView, TemplateView, DetailView -from django.db.models import F, Sum +from django.db.models import F, Sum, Q from django.http import HttpResponse from cms.pdf import PeriodSemesterPdf, ModuleDescriptionPdf, FormationPlanPdf @@ -133,6 +133,7 @@ def get_context(context): """ # liste = Module.objects.exclude(total_presentiel=0) liste = Module.objects.filter(pratique_prof=0) + context['sem1'] = liste.exclude(sem1=0) context['tot1'] = liste.aggregate(Sum(F('sem1')))['sem1__sum'] context['sem2'] = liste.exclude(sem2=0)