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
d5ee38b6
Commit
d5ee38b6
authored
Mar 22, 2012
by
Chris Jerdonek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added some TODO's around custom_template.
parent
70b597e8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
0 deletions
+9
-0
pystache/custom_template.py
+4
-0
tests/test_custom_template.py
+5
-0
No files found.
pystache/custom_template.py
View file @
d5ee38b6
...
...
@@ -126,6 +126,7 @@ class Loader(object):
"""
# TODO: rename template_locator to locator.
def
__init__
(
self
,
search_dirs
,
template_locator
=
None
,
reader
=
None
):
if
reader
is
None
:
reader
=
Reader
()
...
...
@@ -135,8 +136,10 @@ class Loader(object):
self
.
reader
=
reader
self
.
search_dirs
=
search_dirs
# TODO: rename this to locator.
self
.
template_locator
=
template_locator
# TODO: make this private.
def
get_relative_template_location
(
self
,
view
):
"""
Return the relative template path as a (dir, file_name) pair.
...
...
@@ -156,6 +159,7 @@ class Loader(object):
return
(
template_dir
,
file_name
)
# TODO: make this private.
def
get_template_path
(
self
,
view
):
"""
Return the path to the view's associated template.
...
...
tests/test_custom_template.py
View file @
d5ee38b6
...
...
@@ -134,6 +134,11 @@ class ViewTestCase(unittest.TestCase):
self
.
assertEquals
(
view
.
render
(),
"""one, two, three, empty list"""
)
# TODO: switch these tests to using the CustomizedTemplate class instead of View.
# TODO: rename the get_template() tests to test load().
# TODO: condense, reorganize, and rename the tests so that it is
# clear whether we have full test coverage (e.g. organized by
# CustomizedTemplate attributes or something).
class
LoaderTests
(
unittest
.
TestCase
,
AssertIsMixin
):
# TODO: rename this method to _make_loader().
...
...
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