I want to delete a key from a flask session dictionary like this:
del session["host"]
The host key gets deleted (I tested this by printing), but when the page gets redirected, if reappears (I did this by deleting it and then printing it in another request). How can I fix this? If you want me to, I will post the full code. (I am using the same tab in an incognito browser)
I modified the dictionary outside of a function that has the app.route()
decorator. Make sure you modify it inside of a function with the decorator.