disable partial rendering

This commit is contained in:
Damien Elmes 2010-11-27 20:48:34 +09:00
parent 9e790ce747
commit 6d787a92f1

View file

@ -135,16 +135,16 @@ class Template(object):
"""Render a tag without escaping it.""" """Render a tag without escaping it."""
return unicode(get_or_attr(context, tag_name, '')) return unicode(get_or_attr(context, tag_name, ''))
@modifier('>') # @modifier('>')
def render_partial(self, tag_name=None, context=None): # def render_partial(self, tag_name=None, context=None):
"""Renders a partial within the current context.""" # """Renders a partial within the current context."""
# Import view here to avoid import loop # # Import view here to avoid import loop
from pystache.view import View # from pystache.view import View
view = View(context=context) # view = View(context=context)
view.template_name = tag_name # view.template_name = tag_name
return view.render() # return view.render()
@modifier('=') @modifier('=')
def render_delimiter(self, tag_name=None, context=None): def render_delimiter(self, tag_name=None, context=None):