I should search in 3 models. And the documentation is not clear to me. I read hystack v2.4.1
I added new class in my main views.py file: class TicketSearchView(SearchView): """My custom search view.""" model = Ticket def get_queryset(self): # return Ticket.objects.all() queryset = super(TicketSearchView, self).get_queryset() queryset = get_with_perms('ticket', self.request.user, queryset) # further filter queryset based on some set of criteria print("GET_QUERYSET", queryset) return queryset # return queryset.filter(pub_date__gte=date(2015, 1, 1)) def get_context_data(self, *args, **kwargs): context = super(TicketSearchView, self).get_context_data(*args, **kwargs) # do something return context But: 1. it's just one model how to add others: Method and Todo 2. I use additional filtering based on the model fields, and got error: 'SearchQuerySet' object has no attribute 'created_at', yes I know what this means, and: A) Thus, I must either give to search the objects that you want to search B) Or filter search results My function get_with_perms makes additional filtering based on perms and model fields. -- You received this message because you are subscribed to the Google Groups "django-haystack" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-haystack+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.