Skip to content

Commit

Permalink
added extra context to view func
Browse files Browse the repository at this point in the history
  • Loading branch information
justquick committed Apr 29, 2010
1 parent 920c0e2 commit 10177e3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion categories/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

@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],
Expand All @@ -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))

0 comments on commit 10177e3

Please sign in to comment.