开发者

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

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜