[Answered ]-Custom view does not show results in Django Haystack with Elastic Search

2πŸ‘

βœ…

It seems that the page.object_list variable name for the queryset does not exist.
Try the object_list without the β€˜page’ prefix.

instead of

{% for result in page.object_list %}

use

{% for result in object_list %}

Alternatively you can provide a custom variable name in the view by appending something like this

context_object_name = 'haystack_objects'

and use it in the template

{% for result in haystack_objects %}
πŸ‘€Peterpanx

Leave a comment