Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

this is it

  • Loading branch information...
commit 1360746ca73a99e35111a333acf5ffd6b3834788 1 parent 1f82417
@sorl sorl authored
Showing with 7 additions and 4 deletions.
  1. +7 −4 utkik/base.py
View
11 utkik/base.py
@@ -116,13 +116,16 @@ def get_template_names(self):
u'%s/%s.ajax.html' % fmt ] + template_names
return [ t for t in template_names if t ]
- def render(self):
+ def render(self, template_name=None):
"""
- Renders :meth:`self.get_template_names` using :meth:`get_context_data`.
+ Renders :meth:`self.get_template_names` using :meth:`get_context_data`,
+ alternatively renders a provided `template_name` template.
By default, this is called from :meth:`get_response` if the handler does
not return a response.
"""
- return render_to_response(self.get_template_names(),
- self.get_context_data(), RequestContext(self.request))
+ return render_to_response(
+ self.template_name or self.get_template_names(),
+ self.get_context_data(), RequestContext(self.request)
+ )
Please sign in to comment.
Something went wrong with that request. Please try again.