title: Using flask session to store dict
body: <p>As a follow-up on an <a href="https://stackoverflow.com/questions/44457881/return-variable-as-well-as-render-template/44458270#44458270">earlier question</a>, I wonder how to use <a href="http://flask.pocoo.org/docs/1.0/api/#flask.g" rel="nofollow noreferrer"><code>flask.g</code></a> and <code>flask.session</code> to transfer a dictionary from one function to another. If I understand <code>g</code> correctly, it only temporarily stores info until a new request. Since the function I want to transfer the dict object to, starts with a new request (it loads a new flask template), I guess I cannot use <code>g</code>. So, this leaves me to wonder whether I can use <code>flask.session</code> for this. If I try to save my dict as follows: session.dict, and then try to use this dict in a new function, it returns an "AttributeError: 'FileSystemSession' object has no attribute 'dict'.</p>
  
  <p>Any idea whether the saving of a dict in a flask session is at all possible? And if so, what am I doing wrong?</p>