title: How to access session variables in jinja 2 - Flask
body: <p>Do I need to pass session variables manually from Flask to my HTML or are they automatically sent in some way?</p>
  
  <p>Can I do</p>
  
  <pre><code>return render_template('index.html')
  </code></pre>
  
  <p>and access a session variable <code>username</code>, for example, like <code>{{session['username'}}</code> in the HTML file?</p>