Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
858cfcf8
Commit
858cfcf8
authored
Mar 24, 1998
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added 'call' tag.
parent
45a72e57
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
2 deletions
+23
-2
lib/python/DocumentTemplate/DT_String.py
lib/python/DocumentTemplate/DT_String.py
+1
-0
lib/python/DocumentTemplate/DT_Var.py
lib/python/DocumentTemplate/DT_Var.py
+22
-2
No files found.
lib/python/DocumentTemplate/DT_String.py
View file @
858cfcf8
...
...
@@ -26,6 +26,7 @@ class String:
commands
=
{
'var'
:
DT_Var
.
Var
,
'call'
:
DT_Var
.
Call
,
'in'
:
DT_In
.
In
,
'if'
:
DT_If
.
If
,
'unless'
:
DT_If
.
Unless
,
...
...
lib/python/DocumentTemplate/DT_Var.py
View file @
858cfcf8
...
...
@@ -106,7 +106,7 @@ __doc__='''Variable insertion parameters
'"blah blah blah blah"', then the tag
'<!--#var spam size=10-->' inserts '"blah blah ..."'.
'''
# '
__rcs_id__
=
'$Id: DT_Var.py,v 1.1
0 1998/03/10 20:32:32
jim Exp $'
__rcs_id__
=
'$Id: DT_Var.py,v 1.1
1 1998/03/24 20:21:39
jim Exp $'
############################################################################
# Copyright
...
...
@@ -160,7 +160,7 @@ __rcs_id__='$Id: DT_Var.py,v 1.10 1998/03/10 20:32:32 jim Exp $'
# (540) 371-6909
#
############################################################################
__version__
=
'$Revision: 1.1
0
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.1
1
$'
[
11
:
-
2
]
from
DT_Util
import
*
...
...
@@ -253,6 +253,23 @@ class Var:
__call__
=
render
class
Call
:
name
=
'call'
expr
=
None
def
__init__
(
self
,
args
):
args
=
parse_params
(
args
,
name
=
''
,
expr
=
''
)
self
.
__name__
,
self
.
expr
=
name_param
(
args
,
'call'
,
1
)
def
render
(
self
,
md
):
name
=
self
.
__name__
val
=
self
.
expr
if
val
is
None
:
md
[
name
]
else
:
val
.
eval
(
md
)
return
''
__call__
=
render
def
html_quote
(
v
,
name
=
'(Unknown name)'
,
md
=
{},
character_entities
=
(
(
regex
.
compile
(
'&'
),
'&'
),
...
...
@@ -343,6 +360,9 @@ modifiers=map(lambda f: (f.__name__, f), modifiers)
############################################################################
# $Log: DT_Var.py,v $
# Revision 1.11 1998/03/24 20:21:39 jim
# Added 'call' tag.
#
# Revision 1.10 1998/03/10 20:32:32 jim
# Fixed miss-spelling of newline_to_br
#
...
...
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