mirror of
https://github.com/Hopiu/django-watson.git
synced 2026-03-16 22:00:22 +00:00
Flatten context for render_to_string
This is now required for Django 1.11
This commit is contained in:
parent
5ac7bba7ba
commit
b0435d0b72
1 changed files with 2 additions and 2 deletions
|
|
@ -19,7 +19,7 @@ def search_results(context, search_results):
|
|||
"search_results": search_results,
|
||||
"query": context["query"],
|
||||
})
|
||||
return template.loader.render_to_string("watson/includes/search_results.html", context)
|
||||
return template.loader.render_to_string("watson/includes/search_results.html", context.flatten())
|
||||
finally:
|
||||
context.pop()
|
||||
|
||||
|
|
@ -45,6 +45,6 @@ def search_result_item(context, search_result):
|
|||
"watson/includes/search_result_{app_label}_{model_name}.html".format(**params),
|
||||
"watson/includes/search_result_{app_label}.html".format(**params),
|
||||
"watson/includes/search_result_item.html",
|
||||
), context)
|
||||
), context.flatten())
|
||||
finally:
|
||||
context.pop()
|
||||
|
|
|
|||
Loading…
Reference in a new issue