Fixed rooms queryset to be ordered

This commit is contained in:
Brian Rosner 2012-08-30 00:57:02 -06:00
parent 14f43da962
commit 69097d86c9

View file

@ -12,7 +12,7 @@ class TimeTable(object):
return Slot.objects.filter(day=self.day) return Slot.objects.filter(day=self.day)
def rooms(self): def rooms(self):
return Room.objects.filter(day=self.day.schedule) return Room.objects.filter(day=self.day.schedule).order_by("order")
def __iter__(self): def __iter__(self):
times = sorted(set(itertools.chain(*self.slots_qs().values_list("start", "end")))) times = sorted(set(itertools.chain(*self.slots_qs().values_list("start", "end"))))