models.py
class Entry(models.Model):
paid = models.FloatField(blank=True, null=True)
price = models.FloatField(blank=True, null=True)
I want to get all entries that have paid and price columns the same value. How can I achieve this?
models.py
class Entry(models.Model):
paid = models.FloatField(blank=True, null=True)
price = models.FloatField(blank=True, null=True)
I want to get all entries that have paid and price columns the same value. How can I achieve this?
I found a solution for this
from django.db.models import F
Entry.objects.filter(price=F('paid'))