Commit 18b6c253 by Chris Jerdonek

Removed the partials argument from the View constructor.

parent 87deeab9
...@@ -52,24 +52,13 @@ class View(object): ...@@ -52,24 +52,13 @@ class View(object):
locator = TemplateLocator() locator = TemplateLocator()
def __init__(self, context=None, partials=None): def __init__(self, context=None):
""" """
Construct a View instance. Construct a View instance.
Arguments:
partials: a custom object (e.g. dictionary) responsible for
loading partials during the rendering process. The object
should have a get() method that accepts a string and returns
the corresponding template as a string, preferably as a
unicode string. The method should return None if there is
no template with that name, or raise an exception.
""" """
context = Context.create(self, context) context = Context.create(self, context)
self._partials = partials
self.context = context self.context = context
def _get_renderer(self): def _get_renderer(self):
...@@ -79,8 +68,7 @@ class View(object): ...@@ -79,8 +68,7 @@ class View(object):
# instantiation some of the attributes on which the Renderer # instantiation some of the attributes on which the Renderer
# depends. This lets users set the template_extension attribute, # depends. This lets users set the template_extension attribute,
# etc. after View.__init__() has already been called. # etc. after View.__init__() has already been called.
renderer = Renderer(partials=self._partials, renderer = Renderer(file_encoding=self.template_encoding,
file_encoding=self.template_encoding,
search_dirs=self.template_path, search_dirs=self.template_path,
file_extension=self.template_extension) file_extension=self.template_extension)
self._renderer = renderer self._renderer = renderer
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment