From 01dffbea70cb55d8ebbbcfa8976a913df079f47c Mon Sep 17 00:00:00 2001 From: Marcin Koziej Date: Thu, 19 Jan 2012 17:19:52 +0100 Subject: [PATCH] pass context --- apps/search/templatetags/search_tags.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/search/templatetags/search_tags.py b/apps/search/templatetags/search_tags.py index 03e33c8d2..8ae648d1d 100644 --- a/apps/search/templatetags/search_tags.py +++ b/apps/search/templatetags/search_tags.py @@ -22,10 +22,10 @@ from catalogue.models import Book register = template.Library() -@register.inclusion_tag('catalogue/book_searched.html') -def book_searched(result): +@register.inclusion_tag('catalogue/book_searched.html', takes_context=True) +def book_searched(context, result): book = Book.objects.get(pk=result.book_id) - vals = book_wide(book) + vals = book_wide(context, book) # snippets = [] # for hit in result.hits: -- 2.20.1