From 10177e3d2e083dad76036744f505c4141496aeb6 Mon Sep 17 00:00:00 2001 From: Justin Quick Date: Thu, 29 Apr 2010 11:07:05 -0400 Subject: [PATCH] added extra context to view func --- categories/views.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/categories/views.py b/categories/views.py index c681f05..df5392c 100644 --- a/categories/views.py +++ b/categories/views.py @@ -8,7 +8,7 @@ from settings import CACHE_VIEW_LENGTH @cache_page(CACHE_VIEW_LENGTH) def category_detail(request, path, with_stories=False, - template_name='categories/category_detail.html'): + template_name='categories/category_detail.html', extra_context={}): path_items = path.strip('/').split('/') category = get_object_or_404(Category, slug__iexact = path_items[-1], @@ -22,4 +22,6 @@ def category_detail(request, path, with_stories=False, context = RequestContext(request) context.update({'category':category}) + if extra_context: + context.update(extra_context) return HttpResponse(select_template(templates).render(context)) \ No newline at end of file