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
e336a961
Commit
e336a961
authored
Dec 31, 2011
by
Chris Jerdonek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Renamed call()'s argument "x" to "val".
parent
c602054f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
pystache/template.py
+8
-8
No files found.
pystache/template.py
View file @
e336a961
...
...
@@ -2,18 +2,18 @@ import re
import
cgi
import
inspect
def
call
(
view
,
x
,
template
=
None
):
if
callable
(
x
):
(
args
,
_
,
_
,
_
)
=
inspect
.
getargspec
(
x
)
def
call
(
view
,
val
,
template
=
None
):
if
callable
(
val
):
(
args
,
_
,
_
,
_
)
=
inspect
.
getargspec
(
val
)
if
len
(
args
)
is
0
:
x
=
x
()
val
=
val
()
elif
len
(
args
)
is
1
and
args
[
0
]
==
'self'
:
x
=
x
(
view
)
val
=
val
(
view
)
elif
len
(
args
)
is
1
:
x
=
x
(
template
)
val
=
val
(
template
)
else
:
x
=
x
(
view
,
template
)
return
unicode
(
x
)
val
=
val
(
view
,
template
)
return
unicode
(
val
)
def
parse
(
template
,
view
,
delims
=
(
'{{'
,
'}}'
)):
tmpl
=
Template
(
template
)
...
...
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