django model fields comparison
is there a way l can compare two columns | fields in django like
Invoice.obje开发者_JAVA技巧cts.filter(amountdue_lt=invoiceamount)
where amountdue
and invoiceamount
are two columns of Invoice
object
Thanks
You can, in Django 1.1 using the F() object
精彩评论