2
The session is the place to store data between requests.
# in done():
request.session['dict_to_save'] = my_dict_to_save
return redirect('/new/url/to/redirect/to')
# in the new view:
values_from_session = request.session.pop('dict_to_save', None)
0
It would be much better if you would redirect request inside done()
method, like the docs advises you to do.
This solves your issue as well, since you can define your own url to redirect to, there’s related SO question of how to add hash tags when redirecting.
- [Answered ]-Python objects lose state after every request in nginx
- [Answered ]-Save() on a model instance not update the changed field on related model side
- [Answered ]-Where do I put my django Template Context Processor setting in Django 1.10
- [Answered ]-Django redirecting from one view to another
Source:stackexchange.com