1 from datetime import datetime
2 from django.shortcuts import render
3 from events.models import Event
7 return render(request, 'events/event_list.html', {
8 'object_list': Event.objects.filter(date__gte=datetime.now())
12 def events_past(request):
13 return render(request, 'events/event_list.html', {
14 'object_list': Event.objects.filter(date__lte=datetime.now()