def logout(request, session_id): unauth_session = get_unauth_session(request) try: # Update the unauth session with the hacker bucks and flags session = Session.get_session(session_id) unauth_session.from_other_session(session) except KeyError: pass AuthenticatedSession.logout(session_id) return redirect("crapdb:index")
def logout(request, session_id): unauth_session = get_unauth_session(request) try: # Update the unauth session with the hacker bucks and flags session = Session.get_session(session_id) unauth_session.from_other_session(session) except KeyError: pass AuthenticatedSession.logout(session_id) return redirect("crapdb:index")
def sync_session(request, session_id): ret = {} unauth_session = get_unauth_session(request) try: # Update the unauth session with the hacker bucks and flags session = Session.get_session(session_id) unauth_session.from_other_session(session) except KeyError: pass ret = {"hacker_bucks": unauth_session.hacker_bucks} return HttpResponse(json.dumps(ret))
def sync_session(request, session_id): ret = {} unauth_session = get_unauth_session(request) try: # Update the unauth session with the hacker bucks and flags session = Session.get_session(session_id) unauth_session.from_other_session(session) except KeyError: pass ret = {"hacker_bucks": unauth_session.hacker_bucks} return HttpResponse(json.dumps(ret))