[Answer]-Where condition based on another field value in django

1👍

To compare a value in a filter with another field on the model, use F() objects:

from django.db.models import F
Item.objects.filter(curPrice__lt=F('minprice'))

Leave a comment