1π
β
i donβt know what are you do, but you send locals() as context. first, why you did this? you donβt use them in template. second, you should send your context in third parameter in render() and if you so need locals in template context, write something like this:
ctx = locals()
ctx.update(
js_json1 = json1,
TotVar = tot,
)
return render(request, 'uploaded.html', ctx)
or
ctx = {
'locals': locals(),
'js_json1': json1,
'TotVar': tot,
}
return render(request, 'uploaded.html', ctx)
https://docs.djangoproject.com/en/1.10/topics/http/shortcuts/#render
π€dd42
Source:stackexchange.com