django delete session

Solutions on MaxInterview for django delete session by the best coders in the world

showing results for - "django delete session"
Kya
09 Mar 2016
1def logout(request):
2    try:
3        del request.session['member_id']
4    except KeyError:
5        pass
6    return HttpResponse("You're logged out.")
7