title: Session is not working in django restviews
body: <p>Hi i am trying to set a value in session but not getting the value, I don't know what I am doing wrong.</p>
  <p>Setting Value</p>
  <pre><code>class ClView(GenericAPIView):
  
      def get(self, request, *args, **kwargs):
          # Get Method Code
      def post(self, request, *args, **kwargs):
          cid = request.data['id'] 
          self.request.session['myid'] = cid
          request.session.modified = True
          return Response(status=status.HTTP_202_ACCEPTED)
  </code></pre>
  <p>Getting Value</p>
  <pre><code>class MainView(APIView):
      def get(self, request, *args, **kwargs):
          cid = self.request.session.get('myid')
          return Response({&quot;id&quot;:cid})
  </code></pre>
  <p><code>'django.contrib.sessions.middleware.SessionMiddleware',</code> in the middlewares
  and already tried without <code>'self'</code></p>