title: How to set new value for a key in Django Session_data
body: <p>What I have in my encoded session_data is:</p>
  
  <pre><code>'workspaceKey':'8d7f4b3106c740c1a54970a8b67d156d', 
  '_auth_user_hash': '7e024dd67ccb0e2aaab9ac1a92887109f7f020e4', 
  '_auth_user_id': '1', 
  '_auth_user_backend': 'django.contrib.auth.backends.ModelBackend'
  </code></pre>
  
  <p>What I have tried is (1st approach):</p>
  
  <pre><code>request.session['workspaceKey'] = "123f4b3106c740c1a54970a8b67d111d"
  </code></pre>
  
  <p>but it is not updating workspaceKey is my existing session_data</p>
  
  <p>Another approach what I tried is:</p>
  
  <pre><code>sessionid = Session.objects.get(session_key=session_key)
  sessionid.get_decoded()['workspaceKey'] = "8d7f4b3106c740c1a54970a8b67d111d"
  </code></pre>
  
  <p>Again it is not updating workspaceKey is my existing session_data.
  I have also tried below combinations with respect to above approach</p>
  
  <pre><code>request.session.modified = True 
  SESSION_SAVE_EVERY_REQUEST=False
  </code></pre>
  
  <p>My code is like this</p>
  
  <pre><code>session_key = request.data['sessionKey'] 
  request.session['workspaceKey']= "somenewkey" 
  request.session.modified = True 
  sessionid = Session.objects.get(session_key=session_key) 
  session_data= sessionid.get_decoded()
  print session_data
  </code></pre>
  
  <p>What I expect in my output as (new workspace key should be updated)</p>
  
  <pre><code>'workspaceKey':'123f4b3106c740c1a54970a8b67d111d', 
  '_auth_user_hash': '7e024dd67ccb0e2aaab9ac1a92887109f7f020e4', 
  '_auth_user_id': '1', 
  '_auth_user_backend': 'django.contrib.auth.backends.ModelBackend'
  </code></pre>