title: Django - SuspiciousOperation, request session deleted
body: <p>I'm getting this error and I have no idea why:</p>
  
  <pre><code>SuspiciousOperation at /file/path/
  
  The request's session was deleted before the request completed. 
  The user may have logged out in a concurrent request, for example.
  </code></pre>
  
  <p>I know the user isn't logging out (no account to log in to in the first place).</p>
  
  <p>The error is occurring in one of my views when I make a call to <code>request.session</code> and try to pull some chart data that I have stored. It's causing my charts to not display on the page since it can't pull the data in time.</p>
  
  <p>Here is the stack trace:</p>
  
  <pre><code>/opt/name/env/lib/python2.7/site-packages/django/core/handlers/base.py in get_response
  131.   response = middleware_method(request, response)
  
  /opt/name/env/lib/python2.7/site-packages/django/contrib/sessions/middleware.py in process_response
  61.    "The request's session was deleted before the "
  </code></pre>
  
  <p>Any idea what I could be doing wrong here?</p>
  
  <p>EDIT - In the code where the error is occurring:::</p>
  
  <pre><code>def exmaple_function(request, name):
      response = request.session['key']['key'][name]
      return HttpResponse(response, content_type="text")
  </code></pre>
  
  <p>What's interesting is that these errors only happen on my production version of the site - not my local testing or sandbox versions.</p>