Reputation: 17886
is there a way l can compare two columns | fields in django like
Invoice.objects.filter(amountdue_lt=invoiceamount)
where amountdue and invoiceamount are two columns of Invoice object
amountdue
invoiceamount
Invoice
Thanks
Upvotes: 1
Views: 834
Reputation: 26678
You can, in Django 1.1 using the F() object
Upvotes: 4