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
cab8528f
Commit
cab8528f
authored
Mar 29, 2012
by
Chris Jerdonek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Renamed custom_template.Loader to CustomLoader.
parent
ed2c5521
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
5 deletions
+4
-5
pystache/custom_template.py
+3
-4
tests/test_custom_template.py
+1
-1
No files found.
pystache/custom_template.py
View file @
cab8528f
...
...
@@ -8,9 +8,8 @@ This module supports specifying custom template information per view.
import
os.path
from
.context
import
Context
from
.loader
import
Loader
from
.locator
import
Locator
as
TemplateLocator
# TODO: remove this alias.
from
pystache.loader
import
Loader
as
Reader
from
.renderer
import
Renderer
...
...
@@ -121,7 +120,7 @@ class View(CustomizedTemplate):
return
renderer
.
render
(
template
,
self
.
context
)
class
Loader
(
object
):
class
Custom
Loader
(
object
):
"""
Supports loading a custom-specified template.
...
...
@@ -133,7 +132,7 @@ class Loader(object):
locator
=
TemplateLocator
()
if
reader
is
None
:
reader
=
Re
ader
()
reader
=
Lo
ader
()
if
search_dirs
is
None
:
search_dirs
=
[]
...
...
tests/test_custom_template.py
View file @
cab8528f
...
...
@@ -16,7 +16,7 @@ from examples.inverted import Inverted, InvertedLists
from
pystache
import
CustomizedTemplate
as
Template
from
pystache
import
Renderer
from
pystache
import
View
from
pystache.custom_template
import
Loader
as
CustomLoader
from
pystache.custom_template
import
CustomLoader
from
pystache.locator
import
Locator
# TODO: remove this alias.
from
pystache.loader
import
Loader
as
Reader
...
...
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