[Answered ]-How to do less than django queryset with column parameter

1👍

You can use an F-expression [Django-doc] to reference a field, so:

from django.db.models import F

Stock.objects.filter(stockCount__lt=F('minStock')).count()

Leave a comment