title: How to use conditional if statements in Jinja 2?
body: <p>So I am new to Django and can use some help.
  I have used a for loop to display a list from my database. But I want to add an if statement such that, if the user input matches my database item, only then it should be displayed. Take a look :</p>
  
  <pre><code>{%for inc in all_items%}
      &lt;ul&gt;                 
          {#I want to add an if statement here, if user input == inc_element#}
          &lt;li&gt;&lt;p&gt;{{inc.item_name}}&lt;p&gt;&lt;/li&gt;
      &lt;/ul&gt;
      &lt;hr&gt;
  {%endfor%}
  </code></pre>
  
  <p>I know I 'd have to use HTML forums for taking user input. But how do I match it in if statement. Help would be appreciated.</p>