title: Search Bar in Django
body: <p><strong>EDIT: I managed to include a Search bar using 'DjangoFilter'</strong></p>
  
  <p>I would like to add a search bar to my template in Django</p>
  
  <p>I would like to include a search box in above a list of articles so users can search through the data. </p>
  
  <p>When I enter something in the bar nothing happens though...<br>
  here below my code</p>
  
  <p>Thanks for the help in advance
  In HTML page</p>
  
  <pre><code>    &lt;form class="form-inline my-2 my-lg-0"&gt;
      &lt;input class="form-control mr-sm-2" type="search" placeholder="Search" aria-label="Search" name="search" &gt;
      &lt;button class="btn btn-outline-success my-2 my-sm-0" type="submit"&gt;Search&lt;/button&gt;
      &lt;/form&gt;
  </code></pre>
  
  <p>In views.py</p>
  
  <pre><code>def article_overview(request):
      search_term = ''
  
      if 'search' in request.GET:
          search_term = request.GET['search']
          articles = Article.objects.all().filter(feeder__icontains=search_term) 
  
      articles = Article.objects.all()
  
      return render(request, 'overviews/overview.html', {'articles' : articles, 'search_term': search_term })    
  </code></pre>
  
  <p>in overview.html(simplified):</p>
  
  <pre><code>{% for article in articles %}
  &lt;a&gt; {{article.feeder}} &lt;/a&gt; 
  {% endfor %}
  </code></pre>