参考资料:
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.
查看了一下 源码:
改一下参数就好了