[Answer]-How to filter records from a model within view?

1👍

Try this

polls_list = Event.objects.filter(inserttime__gt=timezone.now()).order_by('-inserttime')

For more info, please read Django’s Queryset API reference.

Leave a comment