[Answered ]-Find queryset where one field is greater than another one

1👍

You can take a look at django’s F objects, it allows you to filter objects based on their field values.

from django.db.models import F
Shop.objects.filter(time_open__gt=F('time_closed'))
👤CJ4

Leave a comment