How do I delete a session key in Django after it is used once?
if "uid" in self.request.session.keys():
del self.request.session["uid"]
You could also pop the key from the session. You could set the key to a variable and get rid of it at the same time:
key_variable = request.session.pop('your key')
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