Permalink
Browse files

Updating indents and adding missing returns to jinja2 property.

  • Loading branch information...
1 parent 0100e60 commit ab4c9ddcfa8107991d65dcaace74fcce8e49b519 @dhermes dhermes committed Jan 16, 2013
Showing with 8 additions and 4 deletions.
  1. +8 −4 base_handler.py
View
@@ -26,16 +26,20 @@ class BaseHandler(webapp2.RequestHandler):
@webapp2.cached_property
def jinja2(self):
- """Cached property holding a Jinja2 instance."""
+ """Cached property holding a Jinja2 instance.
+
+ Returns:
+ A Jinja2 object for the current app.
+ """
return jinja2.get_jinja2(app=self.app)
def render_response(self, template, **context):
"""Use Jinja2 instance to render template and write to output.
Args:
- template: filename (relative to $PROJECT/templates) that we are
- rendering.
- context: keyword arguments corresponding to variables in template.
+ template: filename (relative to $PROJECT/templates) that we are
+ rendering.
+ context: keyword arguments corresponding to variables in template.
"""
rendered_value = self.jinja2.render_template(template, **context)
self.response.write(rendered_value)

0 comments on commit ab4c9dd

Please sign in to comment.