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
d631b227
Commit
d631b227
authored
Jan 05, 1998
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added support for fmt="" to allow vars with side effects.
parent
ce36b9e3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
lib/python/DocumentTemplate/DT_Var.py
lib/python/DocumentTemplate/DT_Var.py
+6
-2
No files found.
lib/python/DocumentTemplate/DT_Var.py
View file @
d631b227
...
...
@@ -96,7 +96,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.
6 1997/12/12 16:19:06
jim Exp $'
__rcs_id__
=
'$Id: DT_Var.py,v 1.
7 1998/01/05 21:23:01
jim Exp $'
############################################################################
# Copyright
...
...
@@ -150,7 +150,7 @@ __rcs_id__='$Id: DT_Var.py,v 1.6 1997/12/12 16:19:06 jim Exp $'
# (540) 371-6909
#
############################################################################
__version__
=
'$Revision: 1.
6
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.
7
$'
[
11
:
-
2
]
from
DT_Util
import
*
...
...
@@ -192,6 +192,7 @@ class Var:
val
=
getattr
(
val
,
fmt
)()
elif
special_formats
.
has_key
(
fmt
):
val
=
special_formats
[
fmt
](
val
,
name
,
md
)
elif
fmt
==
''
:
val
=
''
else
:
val
=
fmt
%
val
# next, look for upper, lower, etc
...
...
@@ -313,6 +314,9 @@ special_formats={
############################################################################
# $Log: DT_Var.py,v $
# Revision 1.7 1998/01/05 21:23:01 jim
# Added support for fmt="" to allow vars with side effects.
#
# Revision 1.6 1997/12/12 16:19:06 jim
# Added additional special formats, structured-text and sql-quote.
# Also changed the way formats are handled. This has (and will)
...
...
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