title: Haystack simple search. No objects displayed
body: <p>I am trying to add <code>djangohaystack</code> <code>simple backend</code> into my django app. I've tried following the tutorial but none of the objects in <code>Person</code> are being rendered in the template. I have no idea what I might have missed. The <code>{% if query %}</code> condition is satisfied but the next for loop is not satisfied and <code>No results to display</code> is displayed. </p>
  
  <p><code>models.py</code></p>
  
  <pre><code>class Person(models.Model):
      person_name = models.CharField(max_length=200)
      score = models.FloatField()
  </code></pre>
  
  <p><code>search_indexes.py</code></p>
  
  <pre><code>class PersonIndex(indexes.SearchIndex, indexes.Indexable):
      text = indexes.CharField(document=True, use_template=True)
      person_name = indexes.CharField(model_attr='person_name')
  
      def get_model(self):
          return Person
  
      def index_queryset(self, using=None):
           """Used when the entire index for model is updated."""
          return self.get_model().objects.all()
  
  site.register(Person, PersonIndex)
  </code></pre>
  
  <p><code>note_text</code></p>
  
  <pre><code>{{ object.person_name }}
  </code></pre>
  
  <p><code>search.html</code></p>
  
  <pre><code>{% if query %}
      &lt;h3&gt;Results&lt;/h3&gt;
  
      {% for result in page.object_list %}
          &lt;p&gt;
              &lt;a href="{{ result.object.get_absolute_url }}"&gt;{{ result.object.person_name }}&lt;/a&gt;
          &lt;/p&gt;
      {% empty %}
          &lt;p&gt;No results found.&lt;/p&gt;
      {% endfor %}
  {% endif %}
  </code></pre>
  
  <p>This is all that I have . I know <code>simplebackend</code> is not supposed to do an extensive search but it must return results after exact name search and I need to deploy this on heroku and heroku only supports search engines as pricey add-ons.Any idea if their is something that I might have missed?</p>
  
  <p>/*********************edit 1********************/</p>
  
  <pre><code>  class PersonDetail(generics.RetrieveUpdateDestroyAPIView):
      serializer_class = PersonSerializer
      permission_classes = (IsAuthenticatedOrReadOnly,)
  
    def get_object(self):
      person_id = self.kwargs.get('pk',None)
      return Movie.objects.get(pk=person_id) 
  </code></pre>
  
  <p>full traceback - </p>
  
  <pre><code> AttributeError at /search/
   'module' object has no attribute 'get_model'
   Exception Location: C:\Users\final\lib\site-packages\haystack\forms.py in get_models, line 110
  
  
  Traceback:
  
  File "C:\Users\final\lib\site-packages\django\core\handlers\base.py" in get_response
  149.response = self.process_exception_by_middleware(e, request)
  
  File "C:\Users\final\lib\site-packages\django\core\handlers\base.py" in get_response
  147.response = wrapped_callback(request, *callback_args, **callback_kwargs)
  
  File "C:\Users\final\lib\site-packages\haystack\views.py" in __call__
  51.self.results = self.get_results()
  
  File "C:\Users\final\lib\site-packages\haystack\views.py" in get_results
  91.return self.form.search()
  
  File "C:\Users\final\lib\site-packages\haystack\forms.py" in search
  116.return sqs.models(*self.get_models())
  
  File "C:\Users\final\lib\site-packages\haystack\forms.py" in get_models
  110.search_models.append(models.get_model(*model.split('.')))
  
  Exception Type: AttributeError at /search/
  Exception Value: 'module' object has no attribute 'get_model'
  </code></pre>