Permalink
Browse files

Ensure resource and context are generated before getting the template

  • Loading branch information...
1 parent 9fb2318 commit 5beb0cc5fee2f233392b498986fc3c1bf6234d87 @bfirsh committed Jun 1, 2010
Showing with 2 additions and 1 deletion.
  1. +2 −1 class_based_views/base.py
@@ -103,7 +103,8 @@ def render_html(self, *args, **kwargs):
"""
Render a template with a given resource
"""
- return self.get_template().render(self.get_context(*args, **kwargs))
+ context = self.get_context(*args, **kwargs)
+ return self.get_template().render(context)
def get_template(self):
"""

0 comments on commit 5beb0cc

Please sign in to comment.