【发布时间】:2015-09-13 08:57:10
【问题描述】:
我的views.py中有一行代码:
return render_to_response('errorInsertingData', message='Save isnt complete')
和模板errorInsertingData.html代码:
<script>
alert('{{ message }}');
</script>
为什么会报错:
render_to_string() 得到了一个意外的关键字参数“消息”
我的目标是将味精“保存未完成”作为弹出/味精框。
【问题讨论】:
标签: python django django-templates