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
60d7df29
Commit
60d7df29
authored
Mar 10, 1998
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added better handling of case like:
<!--#in expr="whatever" mapping-->
parent
2bc3fafd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
3 deletions
+15
-3
lib/python/DocumentTemplate/DT_Util.py
lib/python/DocumentTemplate/DT_Util.py
+15
-3
No files found.
lib/python/DocumentTemplate/DT_Util.py
View file @
60d7df29
'''$Id: DT_Util.py,v 1.2
4 1998/03/06 23:22:36
jim Exp $'''
'''$Id: DT_Util.py,v 1.2
5 1998/03/10 15:04:58
jim Exp $'''
############################################################################
# Copyright
...
...
@@ -52,7 +52,7 @@
# (540) 371-6909
#
############################################################################
__version__
=
'$Revision: 1.2
4
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.2
5
$'
[
11
:
-
2
]
import
sys
,
regex
,
string
,
types
,
math
,
os
from
string
import
rfind
,
strip
,
joinfields
,
atoi
,
lower
,
upper
,
capitalize
...
...
@@ -156,8 +156,15 @@ expr_globals={
'__guarded_getslice__'
:
careful_getslice
,
}
def
name_param
(
params
,
tag
=
''
,
expr
=
0
,
attr
=
'name'
):
def
name_param
(
params
,
tag
=
''
,
expr
=
0
,
attr
=
'name'
,
default_unnamed
=
1
):
used
=
params
.
has_key
__traceback_info__
=
params
,
tag
,
expr
,
attr
if
expr
and
used
(
'expr'
)
and
used
(
''
)
and
not
used
(
params
[
''
]):
# Fix up something like: <!--#in expr="whatever" mapping-->
params
[
params
[
''
]]
=
default_unnamed
del
params
[
''
]
if
used
(
''
):
if
used
(
attr
):
raise
ParseError
,
_tm
(
'Two %s values were given'
,
(
attr
,
tag
))
...
...
@@ -312,6 +319,11 @@ except: from pDocumentTemplate import InstanceDict, TemplateDict, render_blocks
############################################################################
# $Log: DT_Util.py,v $
# Revision 1.25 1998/03/10 15:04:58 jim
# Added better handling of case like:
#
# <!--#in expr="whatever" mapping-->
#
# Revision 1.24 1998/03/06 23:22:36 jim
# Added "builtin" '
attr
' function: attr(inst,name,_vars)
#
...
...
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