diff options
author | Chris Jerdonek <chris.jerdonek@gmail.com> | 2012-03-20 16:38:41 -0700 |
---|---|---|
committer | Chris Jerdonek <chris.jerdonek@gmail.com> | 2012-03-20 16:38:41 -0700 |
commit | 08b5173cf445e373426cc98e247251515dfee912 (patch) | |
tree | 674c236a3ee8bd08125376a49b1162a8f1881044 /pystache | |
parent | 8431c10e0d459d905d246de8f7e3e369b2dda663 (diff) | |
download | pystache-08b5173cf445e373426cc98e247251515dfee912.tar.gz |
Renamed custom_template.Loader.get_template() to custom_template.Loader.load().
Diffstat (limited to 'pystache')
-rw-r--r-- | pystache/custom_template.py | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/pystache/custom_template.py b/pystache/custom_template.py index 40f63b9..ce594fb 100644 --- a/pystache/custom_template.py +++ b/pystache/custom_template.py @@ -173,14 +173,20 @@ class Loader(object): return path - def get_template(self, view): + def load(self, custom): """ - Return the unicode template string associated with a view. + Find and return the template associated to a CustomizedTemplate instance. + + Returns the template as a unicode string. + + Arguments: + + custom: a CustomizedTemplate instance. """ - if view.template is not None: - return self.reader.unicode(view.template, view.template_encoding) + if custom.template is not None: + return self.reader.unicode(custom.template, custom.template_encoding) - path = self.get_template_path(view) + path = self.get_template_path(custom) - return self.reader.read(path, view.template_encoding) + return self.reader.read(path, custom.template_encoding) |