1👍
The session object uses the dictionary interface, so you can use pop
instead of get
to retrieve and delete the key at the same time:
back_button = request.session.pop('back_button', False)
Source:stackexchange.com
1👍
The session object uses the dictionary interface, so you can use pop
instead of get
to retrieve and delete the key at the same time:
back_button = request.session.pop('back_button', False)