title: How to endif in Flask Jinja2 templating engine. Getting TemplateSyntaxError: expected token 'end of statement block', got 'session'
body: <p>I'm building a website using <a href="http://flask.pocoo.org/" rel="nofollow">the Flask Framework</a> and I now run into an error which I don't understand. For the simple base.html file I pasted below I'm gettig a <code>TemplateSyntaxError: expected token 'end of statement block', got 'session'</code>, even though I clearly end the if with the <code>{% endif %}</code>.</p>
  
  <p>Does anybody know what I'm doing wrong here?</p>
  
  <pre><code>&lt;!doctype html&gt;
  &lt;div class="page"&gt;
      &lt;div class="metanav"&gt;
          {% if not in session.logged_in %}
              aa
          {% endif %}
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>