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
bd24077a
Commit
bd24077a
authored
Feb 20, 2011
by
Pieter van de Bruggen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleaning up the fetch routine a bit. Also deleting a bit
of unintended diagnostic code.
parent
3fe3ab95
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
pystache/template.py
+5
-6
No files found.
pystache/template.py
View file @
bd24077a
...
...
@@ -75,20 +75,19 @@ class Template(object):
captures
[
'whitespace'
]
=
''
# TODO: Process the remaining tag types.
print
captures
[
'name'
]
fetch
=
lambda
view
:
unicode
(
view
.
get
(
captures
[
'name'
]))
fetch
=
lambda
view
:
view
.
get
(
captures
[
'name'
])
if
captures
[
'tag'
]
==
'!'
:
pass
elif
captures
[
'tag'
]
==
'='
:
print
'"'
,
captures
[
'name'
],
'"'
self
.
otag
,
self
.
ctag
=
captures
[
'name'
]
.
split
()
self
.
_compile_regexps
()
elif
captures
[
'tag'
]
in
[
'{'
,
'&'
]:
buffer
.
append
(
fetch
)
buffer
.
append
(
lambda
view
:
unicode
(
fetch
(
view
))
)
elif
captures
[
'tag'
]
==
''
:
buffer
.
append
(
lambda
view
:
cgi
.
escape
(
fetch
(
view
),
True
))
buffer
.
append
(
lambda
view
:
cgi
.
escape
(
unicode
(
fetch
(
view
)
),
True
))
else
:
print
'Error!'
raise
return
pos
...
...
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