django出现__init__() got an unexpected keyword argument 'mimetype‘ 问题解决
2016-01-26 15:30
627 查看
这种问题好多新手按照djangobook学习的时候应该都遇到过,是因为这是老的django的写法,新的django已经升级改变了很多东西。
处理方法如下:
I think you are not using the latest version of
There was a related fix made in July 2014:
Django's HttpResponse object has deprecated the mimetype kwarg in 1.7
Either run
or, install it directly from github:
According to a changeset,
就是先升级
参考文档:
http://blog.csdn.net/changemyself/article/details/40043131 http://stackoverflow.com/questions/28758787/init-got-an-unexpected-keyword-argument-mimetype
处理方法如下:
I think you are not using the latest version of
django-ajax-selectspackage.
There was a related fix made in July 2014:
Django's HttpResponse object has deprecated the mimetype kwarg in 1.7
Either run
pipwith 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 changeset,
mimetypewas 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
相关文章推荐
- 【Algorithm】Manacher's Algorithm
- gogs安装
- Django session源码阅读
- window批处理-3.go
- 配置Google Analytics
- fonts.googleapis.com加载慢的解决办法
- Longest k-Good Segment
- Google Guava官方教程(中文版)
- Django学习笔记之——Models
- 【CF 617E】 XOR and Favorite Number (Mo's algorithm)
- Google推荐的图片加载库Glide介绍
- google protobuf编译安装(ImportError: No module named google.protobuf.internal)
- 生于洞见 死于调查
- 浅谈一下如何生成一个二维码和内嵌头像Logo的二维码
- hdu 3635 Dragon Balls(并查集)
- 修改HOST来登录Goole
- 杂谈: Google的狠
- SecureCRT的logon action登录跳转设置
- Golang初级系列教程-接口多态性
- <algorithm.h>中sort对结构体排序的用法