From 5dbbff750b6d1659bddcf9065473fea472138fdf Mon Sep 17 00:00:00 2001 From: rogerskw Date: Sat, 8 Mar 2014 17:43:05 -0500 Subject: [PATCH] Issue #51: Sort Theta Tau positions and jobs by year (descending) on the brother profile page --- info/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/info/models.py b/info/models.py index 6a734d9..a42c3a9 100644 --- a/info/models.py +++ b/info/models.py @@ -128,8 +128,8 @@ def __str__(self): class BrotherEntity(): def __init__(self, brotherObj): self.brother = brotherObj - heldPositions = HeldPosition.objects.filter(brother = self.brother.id) - retrievedJobs = Job.objects.filter(brother = self.brother.id) + heldPositions = HeldPosition.objects.filter(brother = self.brother.id).order_by('-year') + retrievedJobs = Job.objects.filter(brother = self.brother.id).order_by('-year') self.positions = [] for heldPosition in heldPositions: self.positions.append(heldPosition)