开发者

Django's BooleanField showing incorrect value in edit mode

DJango: 1.24

DB: MySQL

Colu开发者_如何学编程mn Type: Bit

Code: models.BooleanField(db_column='InStock')

The checkbox always shows checked no matter what the value is (1 or 0). The value gets saved correctly but when it renders the edit page, it always checked.

Any pointers?


You haven't provided much details so I'm guessing that you mean that you have a form and it doesn't have required=False set for the BooleanField.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜