Show the next upcoming one first, instead of ordering them
last-to-first. This makes more sense for current/upcoming, since the one
most likely to be worked on is then at the first position.
Past conferences remain sorted the same way as before, since that leaves
the most recent one first.
Suggsted by Andreas Scherbaum, though not his patch since it didn't
work.
past = []
for c in conferences:
if abs((date.today() - c.startdate).days) < 14 or abs((date.today() - c.enddate).days) < 14:
- current.append(c)
+ current.insert(0, c)
elif c.startdate > date.today():
- upcoming.append(c)
+ upcoming.insert(0, c)
else:
past.append(c)