django 存储数据时 报 IntergrityErrror错误
来源:互联网 发布:意大利脱欧 知乎 编辑:程序博客网 时间:2024/06/06 01:37
Django saves the data but eventually raises an IntegrityError. Django中保存的数据,但最终引发一个IntegrityError。 If there is an error, why it is saving that data?如果有一个错误,为什么它被保存的数据? And I'm sure that the uniqueness property is not violated on that data.而且我敢肯定,没有违反该数据的唯一性。
What is going on?这是怎么回事呢? Why is that error occurs?这是为什么发生错误?and how can I solve that?我怎样才能解决这个问题呢?
I had the same problem.我有同样的问题。 Using Django 1.3.1 and Sqlite3, I had changed the field properties setting blank=True and null=True, but still got the IntegrityError: "Field may not be null".使用Django 1.3.1和SQLite3,我改变了空白= True和空的字段属性设置为True,但仍然有IntegrityError:“字段不能为空”。 I tried successive
python manage.py syncdb
andpython manage.py sqlflush
with no luck.我试过连续python manage.py syncdb
和python manage.py sqlflush
没有运气。I solved it creating a new DB (that is, changing the path to a non-existent filename), and then everything was perfect.我解决它创建一个新的数据库(即,改变路径到一个不存在的文件名),然后一切都很完美。 Obviously, existing data migration is an issue.显然,现有的数据迁移是一个问题。
- django 存储数据时 报 IntergrityErrror错误
- MICROSOFT SQL 2000 数据库报7994错误,不能存储数据
- springmvc 请求数据时,报406错误????
- nginx+uwsgi+django报502错误分析
- Django报编码错误的解决办法
- django admin录入数据报错
- Delphi中调用oracle的存储过程返回数据集报“列不存在”错误
- django数据里的一些错误解决
- Sybase存储过程报transaction mode错误
- 解决用django创建网站时mysql插入中文数据报错的问题
- UpData 数据时,关于数据类型错误一直的报错
- insert数据时,报ORA-01555 22924错误
- Hibernate获取数据时,报java.lang.StackOverflowError错误
- Django发送邮件报[Errno 111] Connection refused错误
- django cms 报 zh-CN/admin/目录错误
- 解决Django使用MySQL报模块找不到的错误
- 使用对象类存储数据时的错误
- eclipse创建django项目的报错Django not found错误
- Ganglia的安装配置
- 二进制.dat文件如何经C++并在matlab中处理
- Linux 多线程应用中如何编写安全的信号处理函数
- 导出表中数据到sql文件
- scanf
- django 存储数据时 报 IntergrityErrror错误
- Jquery实现表格header头随滚动条滚动而滚动
- hdu 4123 Bob’s Race(树形DP&RMQ)
- awstats分析历史日志的处理办法
- Openbravo Smartclient 使用总结(1) - Summary
- MySQL数据库的IO操作
- Unable to execute dex: Multiple dex files define Lcom/jayway/android/robotium/solo/ActivityUtils$1错误
- RTMPdump 使用说明
- 用ASIHttpRequest实现数据缓存和队列
Most likely your model has a field which doesn't allow null value and you are trying to add object without any value for that field.最有可能你的模型中有一个字段不允许空值,您尝试添加该字段的值没有任何对象。
If you can Edit your post and add more details (like model & traceback) then you can expect better response.如果您可以编辑您的文章和添加更多的细节(如模型及追踪),那么你可以期待更好的响应。