Permalink
Browse files

this is it

  • Loading branch information...
1 parent 1f82417 commit 1360746ca73a99e35111a333acf5ffd6b3834788 @sorl committed Nov 22, 2011
Showing with 7 additions and 4 deletions.
  1. +7 −4 utkik/base.py
View
@@ -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)
+ )

0 comments on commit 1360746

Please sign in to comment.