开发者

How does django insert a row into a database where one of the columns is NOT NULL?

In the django admin I inserted a row by specifying 2 columns ( firstName, lastName ) and the description column had blank=True set.

I then tried mimicing this with fixtures because I have to import data from a legacy sql dump but I can't seem to avoid filling in a value for description. What is django doing different? Does it specify all columns and possibl开发者_JS百科y specify an empty string or something that doesn't qualify as null?


When you use a form to populate a row, any inputs that are empty give '', so the fields get filled with an empty string rather than NULL.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜