开发者

How do I write this query in Django?

Suppose开发者_如何学运维 I have a datetime column.

"SELECT * FROM mytable WHERE thetime < INTERVAL 1 HOUR"

How do you write this in Django?


MyModel.objects.extra(where=['thetime < INTERVAL 1 HOUR'])
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜