开发者

django model fields comparison

开发者 https://www.devze.com 2022-12-25 18:26 出处:网络
is there a way l can compare two columns | fields in djangolike Invoice.obje开发者_JAVA技巧cts.filter(amountdue_lt=invoiceamount)

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

0

精彩评论

暂无评论...
验证码 换一张
取 消