2👍
✅
Instead of redirecting, you should instead render a response with the updated session. For example:
def my_example(request):
request.session['key'] = True
response = render_to_response("example.html", context_instance = RequestContext( request ), mimetype = "text/html" )
return response
0👍
That’s not an error any request needs a response to display something to the user. Can you add your button function?
Source:stackexchange.com