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