summaryrefslogtreecommitdiff
path: root/pystache
diff options
context:
space:
mode:
authorChris Jerdonek <chris.jerdonek@gmail.com>2012-03-23 13:23:44 -0700
committerChris Jerdonek <chris.jerdonek@gmail.com>2012-03-23 13:23:44 -0700
commita27c29158c9a8fe1c03abc9cc715a5f304c93ab7 (patch)
treed1f8137778876f080b374c39245aed203193b86d /pystache
parentd54cc252df3472323504fcc732f3de8152f5b694 (diff)
downloadpystache-a27c29158c9a8fe1c03abc9cc715a5f304c93ab7.tar.gz
Made search_dirs an optional argument to Loader.__init__().
Diffstat (limited to 'pystache')
-rw-r--r--pystache/custom_template.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/pystache/custom_template.py b/pystache/custom_template.py
index 1500014..a16e49a 100644
--- a/pystache/custom_template.py
+++ b/pystache/custom_template.py
@@ -13,6 +13,7 @@ from .reader import Reader
from .renderer import Renderer
+# TODO: rename this to Template?
class CustomizedTemplate(object):
"""
@@ -126,16 +127,19 @@ class Loader(object):
"""
- def __init__(self, search_dirs, locator=None, reader=None):
+ def __init__(self, search_dirs=None, locator=None, reader=None):
+ if locator is None:
+ locator = TemplateLocator()
+
if reader is None:
reader = Reader()
- if locator is None:
- locator = TemplateLocator()
+ if search_dirs is None:
+ search_dirs = []
+ self.locator = locator
self.reader = reader
self.search_dirs = search_dirs
- self.locator = locator
# TODO: make this private.
def get_relative_template_location(self, view):