如何使用render_to_string时填充{%csrf_token%}

我须要使用render_to_string,但不能使用html {%csrf_token%} 并经过python content = render_to_string('blog/comment.html', context=context) return JsonResponse({'content': content}) 解决方案 我已经解决了这个问题,可是我仍然很是想要一个好的解决方案。s
相关文章
相关标签/搜索