title: my haystck results are not displaying on the results page
body: <p>I am new to python and django and I was following a tut with major errata. right now I am trying to get the results page to display my results. This is not my code, it's from a tutorial. Here is my code.</p>
  
  <p>my views.py</p>
  
  <pre><code>def post_search(request):
  
  form = request.GET.get('q')
      results = SearchQuerySet().models(Post).filter(content=form)
      # count total results
      total_results = results.count()
      template = 'blog/post/search.html',
      context = {
          'form': form,
          'results': results,
          'total_results': total_results
  
      }
      return render(request, template, context)
  </code></pre>
  
  <p>my search.html</p>
  
  <pre><code>{% extends "blog/base.html" %}
  
  {% block title %}Search{% endblock %}
  
  {% block content %}
       {% if request.GET %}
             &lt;h1&gt;Posts containing "{{ form.query }}"&lt;/h1&gt;
             &lt;h3&gt;Found {{ total_results }} result{{ total_results|pluralize}}&lt;/h3&gt;
             {% for result in results %}
               {% with post=result.object %}
                 &lt;h4&gt;&lt;a href="{{ post.object.get_absolute_url }}"&gt;{{ post.title }}&lt;/a&gt;&lt;/h4&gt;
                 {{ post.body|truncatewords:5 }}
               {% endwith %}
                   {% empty %}
                  &lt;p&gt;There are no results for your query.&lt;/p&gt;
             {% endfor %}
             &lt;p&gt;&lt;a href="{% url 'blog:post_search' %}"&gt;Search again&lt;/a&gt;&lt;/p&gt;
           {% else %}
             &lt;h1&gt;Search for posts&lt;/h1&gt;
  
             &lt;form action="." method="get"&gt;
               &lt;div&gt;
                  &lt;div class="input-group"&gt;
                    &lt;input type="text" class="form-control" autocomplete="off" name="q" id="search" placeholder="search" value="{{ request.GET.q }}"&gt;
                    &lt;span class="input-group-btn"&gt;
                      &lt;button type="submit" class="btn btn-default"&gt;search&lt;/button&gt;
                    &lt;/span&gt;
                  &lt;/div&gt;&lt;!-- /input-group --&gt;
  
                  &lt;ul class="list-group" id="search-results" style="margin: 5px 0 0 0; width: 325px"&gt;
                  &lt;/ul&gt;
       &lt;/div&gt;
  
     &lt;/form&gt;
       {% endif %}
  
   {% endblock content%}
  </code></pre>
  
  <p>my post_text.txt</p>
  
  <pre><code>{{ object.title }}
  {{ object.tags.all|join:", " }}
  {{ object.body }}
  </code></pre>
  
  <p>search_indexes.py</p>
  
  <pre><code>from haystack import indexes
  
  from .models import Post
  
  
  class PostIndex(indexes.SearchIndex, indexes.Indexable):
     text = indexes.CharField(document=True, use_template=True)
     publish = indexes.DateTimeField(model_attr='publish')
  
     # title_auto = indexes.EdgeNgramField(model_attr='title')
     # content_auto = indexes.EdgeNgramField(model_attr='content')
  
     def get_model(self):
         return Post
  
     def index_queryset(self, using=None):
         """Used when the entire index for model is updated."""
         return self.get_model().objects.all()
  </code></pre>
  
  <p>the only thing that shows on the page after I run a search is</p>
  
  <pre><code>Posts containing ""
  Found 1 result
  
  Search again
  </code></pre>
  
  <p>and if I do this</p>
  
  <pre><code>{{results}}
  </code></pre>
  
  <p>it returns this</p>
  
  <pre><code>[&lt;SearchResult: blog.post (pk='2')&gt;]
  </code></pre>
  
  <p>where it says post containing a name will show
  found results returns a number which lets me know that the results are working</p>
  
  <p>any and all help or guidance in the right direction is greatful. Tried to read the docs. They seem so vague to me. and as I said I am a novice.and there are only  video on the topic and that with frank hibbert and he uses it with ajax</p>