Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
pystache_custom
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
pystache_custom
Commits
a111e916
Commit
a111e916
authored
Jul 21, 2012
by
xgecko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added find_file function, and remove extension check logic from make_file_name
parent
2b07ad52
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletions
+8
-1
pystache/locator.py
+8
-1
No files found.
pystache/locator.py
View file @
a111e916
...
...
@@ -91,7 +91,7 @@ class Locator(object):
if
template_extension
is
None
:
template_extension
=
self
.
template_extension
if
template_extension
is
not
False
and
not
file_name
.
endswith
(
template_extension
)
:
if
template_extension
is
not
False
:
file_name
+=
os
.
path
.
extsep
+
template_extension
return
file_name
...
...
@@ -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.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment