title: how to display django search results in template
body: <p>I am new to django and I am working on a project. I need to create a search functionality where users can search data in models, I've tried coding in this way but even when I searched for items that are in models, It doesn't displayed any result.</p>
  
  <p>view.py </p>
  
  <pre><code>def search(request):
  query = request.GET.get('q')
  results = Myhouses.objects.filter(Q(name_of_accomodation__icontains=query) | Q(type_of_room__icontains=query) | Q(location__icontains=query))
  
  return render(request, 'account/index.html')
  </code></pre>
  
  <p>template</p>
  
  <pre><code>&lt;form method='GET' action='{% url "search" %}'&gt;
      &lt;input type='text' name='q' placeholder="Enter Search Keyword" value='{{ request.GET.q }}' id='intry'&gt;
      &lt;input type='submit' value='Search' class='button_1' id='sub1'&gt;
  &lt;/form&gt;
  </code></pre>