def event_update_list(request, slug):
event = get_object_or_404(Event, slug=slug)<EOL>updates = Update.objects.filter(event__slug=slug)<EOL>if event.recently_ended():<EOL><INDENT>updates = updates.order_by('<STR_LIT:id>')<EOL><DEDENT>else:<EOL><INDENT>updates = updates.order_by('<STR_LIT>')<EOL><DEDENT>return render(request, '<STR_LIT>', {<EOL>'<STR_LIT>': event,<EOL>'<STR_LIT>': updates,<EOL>})<EOL>
Returns a list view of updates for a given event.
If the event is over, it will be in chronological order.
If the event is upcoming or still going,
it will be in reverse chronological order.