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 :
{%for inc in all_items%}
<ul>
{#I want to add an if statement here, if user input == inc_element#}
<li><p>{{inc.item_name}}<p></li>
</ul>
<hr>
{%endfor%}
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.