django出现__init__() got an unexpected keyword argument 'mimetype‘ 问题解决


这种问题好多新手按照djangobook学习的时候应该都遇到过,是因为这是老的django的写法,新的django已经升级改变了很多东西。

处理方法如下:

I think you are not using the latest version of django-ajax-selects package.

There was a related fix made in July 2014:

Either run pip with an upgrade flag:

pip install --upgrade django-ajax-selects

or, install it directly from github:

git clone https://github.com/crucialfelix/django-ajax-selects.git
cd django-ajax-selects
python setup.py install

According to a changesetmimetype was replaced by content_type.

就是先升级django-ajax-selects,然后把代码里边的mimetype换成content_type,就OK了。

参考文档:

   http://blog.csdn.net/changemyself/article/details/40043131

  http://stackoverflow.com/questions/28758787/init-got-an-unexpected-keyword-argument-mimetype

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM