]> git.parisson.com Git - teleforma.git/commitdiff
annal date order
authoryomguy <yomguy@parisson.com>
Sun, 7 Apr 2013 20:46:30 +0000 (22:46 +0200)
committeryomguy <yomguy@parisson.com>
Sun, 7 Apr 2013 20:46:30 +0000 (22:46 +0200)
teleforma/views/crfpa.py

index 857534b37d67679f441df535db59b7b01fa2c71a..b9414a49a86206a92441c0b01d90dec4db775dd3 100644 (file)
@@ -310,10 +310,10 @@ class AnnalsView(ListView):
         courses = [c['course'] for c in self.all_courses]
 
         if self.user.is_staff or self.user.is_superuser or self.user.professor.all():
-            docs = Document.objects.filter(is_annal=True)
+            docs = Document.objects.filter(is_annal=True).order_by('annal_year')
         elif students:
             self.student = students[0]
-            docs = Document.objects.filter(is_annal=True, iej=self.student.iej)
+            docs = Document.objects.filter(is_annal=True, iej=self.student.iej).order_by('annal_year')
         if iej:
             docs = docs.filter(iej=iej)
         if course: