4

I'm building a website using the Flask Framework 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 TemplateSyntaxError: expected token 'end of statement block', got 'session', even though I clearly end the if with the {% endif %}.

Does anybody know what I'm doing wrong here?

<!doctype html>
<div class="page">
    <div class="metanav">
        {% if not in session.logged_in %}
            aa
        {% endif %}
    </div>
</div>
kramer65
  • 39,074
  • 90
  • 255
  • 436

1 Answers1

8

In the following line, the code is missing an operand for not in operator.

{% if ?? not in session.logged_in %}
      ^^

Or, you maybe mean not operator:

{% if not session.logged_in %}
falsetru
  • 314,667
  • 49
  • 610
  • 551
  • I indeed meant the `not` operator. I totally read over the `in` coming after that. I guess it was just a stupid habit doing typing thw `in` after the `not`. Thanks a million! – kramer65 Feb 03 '14 at 12:52