title: 'WSGIRequest' object has no attribute 'session' while upgrading from django 1.3 to 1.9
body: <p>Similar to this question <a href="https://stackoverflow.com/questions/11783404/wsgirequest-object-has-no-attribute-session">&#39;WSGIRequest&#39; object has no attribute &#39;session&#39;</a></p>
  
  <p>But my MIDDLEWARE classes are in the correct order.</p>
  
  <pre class="lang-py prettyprint-override"><code>INSTALLED_APPS = [
      'django.contrib.sessions',
      'django.contrib.admin',
      'django.contrib.auth',
      'django.contrib.contenttypes',
      'django.contrib.messages',
      'django.contrib.staticfiles',
      'membership',
      'treebeard',
      'haystack',
      'reversion',
  ]
  
  MIDDLEWARE = [
      'django.contrib.sessions.middleware.SessionMiddleware',
      'django.middleware.security.SecurityMiddleware',
      'django.middleware.common.CommonMiddleware',
      'django.middleware.csrf.CsrfViewMiddleware',
      'django.contrib.auth.middleware.AuthenticationMiddleware',
      'django.contrib.messages.middleware.MessageMiddleware',
      'django.middleware.clickjacking.XFrameOptionsMiddleware',
  ]
  </code></pre>
  
  <p>I am redirecting to login</p>
  
  <pre class="lang-py prettyprint-override"><code>url(r'^$',  RedirectView.as_view(url='login/')),
  url(r'^login/$', 'membership.views.loginView', name='login'),
  </code></pre>
  
  <p>and then</p>
  
  <pre class="lang-py prettyprint-override"><code>def loginView(request):
      a = request.session
  </code></pre>
  
  <p>Throws the error</p>