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.
精彩评论