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
f44c1e88
Commit
f44c1e88
authored
May 04, 2012
by
Chris Jerdonek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Switched from using _parse() to _render() inside _make_get_section().
parent
c7e71d8f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
pystache/renderengine.py
+4
-4
No files found.
pystache/renderengine.py
View file @
f44c1e88
...
...
@@ -222,8 +222,8 @@ class RenderEngine(object):
new_template
=
element
(
template
[
section_start_index
:
section_end_index
])
# Make sure we are dealing with a unicode template string.
new_template
=
self
.
literal
(
new_template
)
new_parsed_template
=
self
.
_parse
(
new_template
,
delimiters
=
delims
)
parts
.
append
(
new_parsed_template
.
render
(
context
)
)
rendered
=
self
.
_render
(
new_template
,
context
,
delimiters
=
delims
)
parts
.
append
(
rendered
)
continue
context
.
push
(
element
)
...
...
@@ -248,7 +248,7 @@ class RenderEngine(object):
return
parser
.
parse
(
template
=
template
)
def
_render
(
self
,
template
,
context
):
def
_render
(
self
,
template
,
context
,
delimiters
=
None
):
"""
Returns: a string of type unicode.
...
...
@@ -265,7 +265,7 @@ class RenderEngine(object):
if
type
(
template
)
is
not
unicode
:
raise
Exception
(
"Argument 'template' not unicode:
%
s:
%
s"
%
(
type
(
template
),
repr
(
template
)))
parsed_template
=
self
.
_parse
(
template
)
parsed_template
=
self
.
_parse
(
template
,
delimiters
)
return
parsed_template
.
render
(
context
)
...
...
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