阅读背景:

如何为IntegerField设置NULL,而不是设置0?

来源:互联网 

I'm uploading some data from an excel file using xlrd and turning that data into models (with mainly IntegerField values) in Django. My excel file has a bunch of missing data. Unfortunately, these missing data are converted to the value of 0 in my models, instead of NULL. This means that when my Person model doesn't have an age, that age gets recorded as 0, instead of as NULL.I'm uploading some data from an excel file usin




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: