title: Python: Multiple conditions for if statement in Jinja templates
body: <p>I got stuck in my coding project in jinja templates. </p>
  
  <p>I want to show posts of a user just if 2 conditions are met:</p>
  
  <p>The problematic part is if using <code>and</code>, conditions work perfectly individually but the moment I add <code>and</code> and join them together it does not work. </p>
  
  <p>I have tried it with brackets and without them.</p>
  
  <pre><code>{% for post in posts %}
  
    {% if (session['user']['username']==post['author']) and (post["id"] | is_liked) %}
  
    {% else %}
      &lt;li class="row"&gt;
        {% include "components/recommended.html" %}
      &lt;/li&gt;
    {% endif %}
  {% endfor %}
  </code></pre>
  
  <p>Could you please help me how to write that line, so that both conditions are checked?</p>