[Answered ]-Django filter query using future date-time

1👍

You use the __gt lookup [Django-doc] to filter with greater than:

def matches(request):
    matches = Match.objects.filter(match_date_time__gt=timezone.now())
    return render(request, 'bookie/matches.html', {'matches': matches})

Leave a comment