嗨,我有一个简单的视图,我试图将功能传递给 html 页面,但它给了我以下错误:
UnboundLocalError at /enquiry/thanks/
local variable 'features' referenced before assignment
而我的看法
def abc(request):
features = ['1','2','3','4','5','6','7','8','9','0']
return render_to_response("xyz/thanks.html",
{
'test': features,
}, context_instance=RequestContext(request))