diff options
author | Chris Jerdonek <chris.jerdonek@gmail.com> | 2012-07-23 06:30:12 -0700 |
---|---|---|
committer | Chris Jerdonek <chris.jerdonek@gmail.com> | 2012-07-23 06:30:12 -0700 |
commit | 06fa9e75aec3dc60ca589cd2b765075d4b053101 (patch) | |
tree | 597f7b494a1779a507cebb4a271f4728ee8535f4 /pystache/locator.py | |
parent | 3d995628ec8cfce38f3746643d343bb246d150e1 (diff) | |
parent | a111e91673bcc7c7ec765e6c92aa2395f7e5eafe (diff) | |
download | pystache-06fa9e75aec3dc60ca589cd2b765075d4b053101.tar.gz |
Merge pull request #127 from @xgecko into issue-127
From: https://github.com/xgecko/pystache/commit/a111e91673bcc7c7ec765e6c92aa2395f7e5eafe
This request adds support for loading and locating template files
by file name rather than template name.
Thanks @xgecko!
Diffstat (limited to 'pystache/locator.py')
-rw-r--r-- | pystache/locator.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/pystache/locator.py b/pystache/locator.py index 2189cf2..9bb095a 100644 --- a/pystache/locator.py +++ b/pystache/locator.py @@ -123,6 +123,13 @@ class Locator(object): return path + def find_file(self, template_file, search_dirs): + """ + Return the path to a template with the given file name. + + """ + return self._find_path_required(search_dirs, template_file) + def find_name(self, template_name, search_dirs): """ Return the path to a template with the given name. |