相关疑难解决方法(0)

添加到models.py后,"NOT NULL约束失败"

我正在使用userena并在我的models.py中添加以下行

zipcode = models.IntegerField(_('zipcode'),
                                   max_length=5)
Run Code Online (Sandbox Code Playgroud)

我点击注册表单上的提交按钮后出现以下错误:

IntegrityError at /accounts/signup/
NOT NULL constraint failed: accounts_myprofile.zipcode
Run Code Online (Sandbox Code Playgroud)

我的问题是这个错误是什么意思,这与Userena有关吗?

django django-models

30
推荐指数
3
解决办法
9万
查看次数

标签 统计

django ×1

django-models ×1