def check_session_view(request):
 return HttpResponse(request.session.get('session_var', 'NO'))

def check_session_view ( request ) : return HttpResponse ( request . session . get ( 'session_var' , 'NO' ) )
a view that reads a session variable .