The render function of django can return several dictionary parameters

render (request,"index.html", {"index":index})

would you like to ask whether the dictionary type parameter of the index returned later can return more than one parameter at the same time?

for example,: render (request,"index.html", {"index":index,"first":first,"second":second})

if this method is not possible, then I want to return multiple parameters to the front end at the same time, and how to return them. Thank you

Mar.11,2021

can be returned. If the parameter you return is of dictionary type, you can take the value according to the dictionary value at the front end, or in {% for i in index%}
i.xx
{% endfor%}
if it is a loop body.

Menu