Skip to content
Browse files

Avoided creating two RequestContexts per request, which was causing d…

…uplicated queries

- Fixes sub issue of Issue #47: Query count reduction
  • Loading branch information...
1 parent 46799b0 commit 4a0667a286fff87ac369f4e7b54cb57b84ccdbd9 @mvdwaeter mvdwaeter committed Jan 19, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 fiber/views.py
View
4 fiber/views.py
@@ -22,8 +22,8 @@ def page(request):
return HttpResponsePermanentRedirect(page.redirect_page.get_absolute_url())
t = loader.get_template(page.template_name or DEFAULT_TEMPLATE)
- c = RequestContext(request, {'page': page,})
+ context['page'] = page
- response = HttpResponse(t.render(c))
+ response = HttpResponse(t.render(context))
populate_xheaders(request, response, Page, page.id)
return response

0 comments on commit 4a0667a

Please sign in to comment.
Something went wrong with that request. Please try again.