there are two buttons, one is button and the other is form. When I click button, the data is sent to the background, but {{line}}
is not rendered, but when I click form"s View details button, {{line}}
can render it? Why?
the background code is as follows
@csrf_exempt
def post_data(request):
if request.method == "GET":
return render(request, "test.html")
if request.method =="POST":
print(request.POST)
line = {"line":"china"}
return render(request, "test.html",line)