随笔分类 - ErrorExcept
摘要:在使用django admin的时候...发现css样式载入出错...打开firebug提示说xxx.css没有正确载入,因为它的mime类型是text/plain而不是text/css...但是js等其他都是正常的...解决方法...1、将django\contrib\admin\templates\admin路径下的base.html的 删掉...这样做虽然可以...但是其实也是不科学的...打开firebug的话提示变成了xx.css载入,虽然它的mime类型是text/plain而不是text/css...2、直接运行Python manage.py collectstatic ...
阅读全文
摘要:=、=在connector/python 和django1.6结合使用的时候会出翔...在进入django的admin时,报错...类似于...Nonetype has no attribute converter ...这个和python版本没有关系...试了2.7和 3.3版本的都一样...最后查到说是它本身的问题...也不知道是不是...反正蛋疼...现在改成PyMySQL...一下子就搞定了...安装PyMySQL也很简单...https://github.com/PyMySQL/PyMySQL下载好PyMySQL后直接进入目录运行setup.py此时可能出现no module nam
阅读全文
摘要:修改模型层从父类继承来的字段,直接改写报错如下:django.core.exceptions.FieldError: Local field 'authors' in class 'SmithBook' clashes with field of similar name from base class 'Book'出现这个错误的原因在文档中已经说明: https://docs.djangoproject.com/en/1.1/topics/db/models/#field-name-hiding-is-not-permitted解决方法,通过在
阅读全文
摘要:————Python3.3—connector/python 1.1.4—————————————manage.py syncdb出现TypeError:sql_for_inline_foreign_key_references() takes 4 posional arguments but 5 were given...解决方法:修改在python\Lib\site-packages\mysql\connector\django中的creation.py,修改他的方法,原本是-》def sql_for_inline_foreign_key_references(self, field, k
阅读全文

浙公网安备 33010602011771号