summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSerghei Mihai <smihai@entrouvert.com>2019-04-11 12:29:04 (GMT)
committerFrédéric Péters <fpeters@entrouvert.com>2019-04-18 13:15:11 (GMT)
commita38bcdc8039d55c6110b1e14109a2a33ff248014 (patch)
tree4aaf338eaa0a25b1f1adefbfb2bd3d41900e9ec9
parent16ba59fcacb63eb9cec877e5a7cbb691ce913db2 (diff)
downloadcombo-a38bcdc8039d55c6110b1e14109a2a33ff248014.zip
combo-a38bcdc8039d55c6110b1e14109a2a33ff248014.tar.gz
combo-a38bcdc8039d55c6110b1e14109a2a33ff248014.tar.bz2
search: use RequestContext in search results hits rendering (#32192)v2.7
-rw-r--r--combo/apps/search/models.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/combo/apps/search/models.py b/combo/apps/search/models.py
index c06147f..e1816ae 100644
--- a/combo/apps/search/models.py
+++ b/combo/apps/search/models.py
@@ -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):