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