title: How to create an instance of an object in session using django?
body: <p>I have an object model which has to be called on every answer given by the user on the client side. But the problem is whenever user clicks the answer, my view runs and the object is initialised again which should not. So i thought of creating the object instance in session in another separate view and reusing with the same instance again and again in any views. </p>
  
  <p>But it throws me this: </p>
  
  <pre><code>request.session['qn_obj'] = question_class()
      objects not JSON serializable
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/VV6Qe.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/VV6Qe.png" alt="enter image description here"></a></p>
  
  <p>I need help on how to create an instance in session using django.</p>