render_to_string() got an unexpected keyword argument 'context_instance'的解决方法
2017-04-21 11:27
1731 查看
参考资料:
render_to_string() got an unexpected keyword argument ‘status’TypeError at /post/ render_to_response() got an unexpected keyword argument ‘context_instance’
Django error: render_to_response() got an unexpected keyword argument ‘context_instance’
The context_instance parameter in render_to_response was deprecated in Django 1.8, and removed in Django 1.10.
The solution is to switch to the render shortcut, which automatically uses a RequestContext. Update your imports and view as follows. Note that render takes the request object as its first argument.
查看了一下 源码:
改一下参数就好了
相关文章推荐
- render_to_response() got an unexpected keyword argument 'context_instance'
- __init__() got an unexpected keyword argument 'context processor'解决方法
- 解决anaconda pip,parse() got an unexpected keyword argument 'transport_encoding'错误
- 错误解决:parse() got an unexpected keyword argument 'transport_encoding'
- 解决:TypeError: parse() got an unexpected keyword argument 'transport_encoding'
- TypeError: exchange_declare() got an unexpected keyword argument 'type'的解决办法
- windows, python3, TypeError: parse() got an unexpected keyword argument 'transport_encoding' 解决办法
- 解决调用context.Session["NAME"]时总出现Object reference not set to an instance of an object.异常的方法
- TypeError: run() got an unexpected keyword argument 'argv'
- nautilus can't be used now,due to an unexpected error解决方法
- 报错TypeError: pool_2d() got an unexpected keyword argument 'ws'
- python pandas 报错:TypeError: parser_f() got an unexpected keyword argument 'skip_blank_lines'
- 出现 Exception sending context initialized event to listener instance of class XXX 错误的原因及解决方法
- Windows下Keras报错TypeError: <lambda>() got an unexpected keyword argument 'name'
- TypeError: __init__() got an unexpected keyword argument ‘maxlength’
- django-got an unexpected keyword argument ‘maxlength’
- TypeError: histogram() got an unexpected keyword argument 'new'问题
- TypeError: __init__() got an unexpected keyword argument ‘default’
- A context path must either be an empty string or start with a '/' and do not end with a '/' 问题解决方法
- __init__() got an unexpected keyword argument 'mimetype'