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
7e65bb6d
Commit
7e65bb6d
authored
Jan 01, 2012
by
Chris Jerdonek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Couple more tweaks: includes fixing issue rendering function-valued sections.
parent
921a771d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
pystache/renderengine.py
+4
-3
No files found.
pystache/renderengine.py
View file @
7e65bb6d
...
...
@@ -407,7 +407,7 @@ class Template(object):
if
not
val
and
val
!=
0
:
if
tag_name
!=
'.'
:
return
''
val
=
self
.
context
.
top
()
val
=
context
.
top
()
if
callable
(
val
):
# According to the spec:
...
...
@@ -454,9 +454,10 @@ class Template(object):
parse_tree
=
parse_tree_
data
=
context
.
get
(
name
)
if
not
data
:
return
''
data
=
[]
elif
callable
(
data
):
template
=
call
(
val
=
data
,
view
=
context
,
template
=
template
)
# TODO: should we check the arity?
template
=
data
(
template
)
parse_tree
=
self
.
parse_string_to_tree
(
template
,
delims
)
data
=
[
data
]
elif
type
(
data
)
not
in
[
list
,
tuple
]:
...
...
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