From b51131f425fa3aa99235007ad05e3ccd93ec5f90 Mon Sep 17 00:00:00 2001 From: Michele Mattioni Date: Sat, 16 Feb 2013 11:17:34 +0000 Subject: [PATCH] Ordering the event by the days. If the days are created in a succession, so a day has a pk, and the following one has a bigger pk, the order works. I think for now is the best way we can this working, without changing things too much. --- eluminate_web/apps/events/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eluminate_web/apps/events/views.py b/eluminate_web/apps/events/views.py index 126a989..9dc203e 100644 --- a/eluminate_web/apps/events/views.py +++ b/eluminate_web/apps/events/views.py @@ -78,7 +78,7 @@ def render_to_response(self, context, **kwargs): class EventList(CategoryFilterMixin, ListView): model = Event - queryset = Event.objects.filter(participant__approved_on__lt=now()) + queryset = Event.objects.filter(participant__approved_on__lt=now()).order_by('days') def get_queryset(self): queryset = super(EventList, self).get_queryset()