开发者

Django: Null field with managed=False

When a model is not managed by Django, does it matter what the value of null on a 开发者_运维技巧field is?


managed=False no database table creation or deletion operations will be performed for this model. So, Your field is null or not null does not reflect through your code written in models.py


In the model, if you have null=True, then the field can have null or be left blank in a form. If set to False, then the field has to be filled with something other than NULL

Found here: https://docs.djangoproject.com/en/1.3/ref/models/fields/#null

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜