1
You should override the get_queryset()
method:
class EventDirectoryView(ListView):
...
def get_queryset(self):
return Event.objects.exclude(deadline__lt=(date.today()-timedelta(1)))
Source:stackexchange.com
1
You should override the get_queryset()
method:
class EventDirectoryView(ListView):
...
def get_queryset(self):
return Event.objects.exclude(deadline__lt=(date.today()-timedelta(1)))