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
9029b4ba
Commit
9029b4ba
authored
Dec 17, 2011
by
Chris Jerdonek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplified pystache.render(): now shares code with Template.__init__().
parent
78bb39e3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
5 deletions
+3
-5
pystache/init.py
+1
-4
pystache/template.py
+2
-1
No files found.
pystache/init.py
View file @
9029b4ba
...
...
@@ -18,7 +18,4 @@ def render(template, context=None, **kwargs):
Return the given template string rendered using the given context.
"""
context
=
context
and
context
.
copy
()
or
{}
context
.
update
(
kwargs
)
return
Template
(
template
,
context
)
.
render
()
return
Template
(
template
,
context
,
**
kwargs
)
.
render
()
pystache/template.py
View file @
9029b4ba
...
...
@@ -73,7 +73,8 @@ class Template(object):
if
context
is
None
:
context
=
{}
elif
not
isinstance
(
context
,
View
):
if
not
isinstance
(
context
,
View
):
# Views do not support copy() or update().
context
=
context
.
copy
()
if
kwargs
:
...
...
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