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
Source:stackexchange.com