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