title: Django adding basic search in navbar
body: <p>In process of adding basic search bar for searching the menu titles in my menu list I am getting this error</p>
  
  <pre><code>    django.core.exceptions.FieldError: Cannot resolve keyword 'title_icontains' into field. Choices are: id, menu_title, price, title_content
  </code></pre>
  
  <p>Do I have to make a model for the search??</p>
  
  <p>my form view in basic.html looks like this</p>
  
  <pre><code>     &lt;form class="form-inline my-2 my-lg-0" action="/search/" method="get"&gt;
                &lt;input class="form-control mr-sm-2" type="search" name="q" placeholder="Search" aria-label="Search"&gt;
                &lt;button class="btn btn-outline-success my-2 my-sm-0" type="submit" value="Search"&gt;Search&lt;/button&gt;
              &lt;/form&gt;
  </code></pre>
  
  <p>my views.py </p>
  
  <pre><code>   from django.shortcuts import render
     from django.http import HttpResponse,Http404,HttpResponseRedirect,HttpResponseNotFound
     from resturant.models import Carousel
     from resturant.models import Menu
     from django.db.models import Q
     from django import forms
  
  def search(request):
  if 'q' in request.GET and request.GET['q']:
      q = request.GET['q']
      menu_item = Menu.objects.filter(title_icontains = q)
      return render(request, 'sources/search_results.html',{'menu_item':menu_item, 'query': q})
  
  else:
      return HttpResponse('Please submit a search term.')
  </code></pre>
  
  <p>my search_results.html</p>
  
  <pre><code>{% if menu_item %}
      &lt;p&gt;Found {{ menu_item|length }} item{{ menu_item|pluralize }}.&lt;/p&gt;
          &lt;ul&gt;
              {% for s in menu_item %}
              &lt;li class="wow fadeInUp" data-wow-duration="300ms" data-wow-delay="300ms"&gt;
                  &lt;div class="item"&gt;
                      &lt;div class="item-title"&gt;
                      &lt;h2&gt;{{ s.menu_title }}&lt;/h2&gt;
                      &lt;div class="border-bottom"&gt;&lt;/div&gt;
                      &lt;span&gt;$ {{s.price}}&lt;/span&gt;
                      &lt;/div&gt;
                      &lt;p&gt;{{s.title_content}}&lt;/p&gt;
                  &lt;/div&gt;
              &lt;/li&gt;
              {% endfor %}
          &lt;/ul&gt;
  {% else %}
      &lt;p&gt;No Menu_Items matched your search criteria.&lt;/p&gt;
  {% endif %}
  </code></pre>
  
  <p>And my urls.py</p>
  
  <pre><code>    from django.conf.urls import url
      from . import views
      from django.contrib.auth.views import login
  
      urlpatterns =[ 
       url(r'^$', views.index , name= "index"),
       url(r'^menu/$', views.menu , name= "menu"),
       url(r'^check/$',views.check,name='check'),
       url(r'^search/$',views.search, name='search')
  
                     ]
  </code></pre>
  
  <p>Sorry for not posting menu models it looks like this</p>
  
  <pre><code>    class Menu(models.Model):
           menu_title = models.CharField(max_length = 100,)
           price = models.IntegerField()
           title_content = models.CharField(max_length = 500,)
  </code></pre>