search: use RequestContext in search results hits rendering (#32192)
This commit is contained in:
parent
16ba59fcac
commit
a38bcdc803
|
@ -23,7 +23,7 @@ from django.http import HttpResponse
|
|||
from django.core.exceptions import PermissionDenied
|
||||
from django.core.urlresolvers import reverse
|
||||
from django.utils.http import quote
|
||||
from django.template import Context, Template
|
||||
from django.template import RequestContext, Template
|
||||
|
||||
from jsonfield import JSONField
|
||||
from haystack import connections
|
||||
|
@ -168,7 +168,7 @@ class SearchCell(CellBase):
|
|||
if hit_templates:
|
||||
for hit in results.get('data') or []:
|
||||
for k, v in hit_templates.items():
|
||||
hit[k] = v.render(Context(hit))
|
||||
hit[k] = v.render(RequestContext(request, hit))
|
||||
return render_response(service, results)
|
||||
|
||||
def has_text_search_service(self):
|
||||
|
|
Loading…
Reference in New Issue