I have two views.
view1 passes an error message to view2 through a session key.
How do I delete the key after view2 is rendered? I only need it for once:
You can delete the key from the session like any other dictionary.
del request.session['your key']
You may need to mark the session as modified for it to save, depending on some of your settings.
request.session.modified = True