0
为什么当我打电话这样的功能:form.cleaned_data作为字典
function(request, **form.cleaned_data)
我可以发送表单的数据字典,但是当我尝试做这样的:
data = **form.cleaned_data
我会出错吗?
为什么当我打电话这样的功能:form.cleaned_data作为字典
function(request, **form.cleaned_data)
我可以发送表单的数据字典,但是当我尝试做这样的:
data = **form.cleaned_data
我会出错吗?
**
技巧只适用于在函数调用中扩展字典的情况;你不能在函数调用之外使用它。