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
d53167d2
Commit
d53167d2
authored
Oct 21, 1998
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added check for in on string, which now raises an error.
Added check for 'sequence-item' in sort attribute.
parent
250ebe00
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
3 deletions
+14
-3
lib/python/DocumentTemplate/DT_In.py
lib/python/DocumentTemplate/DT_In.py
+14
-3
No files found.
lib/python/DocumentTemplate/DT_In.py
View file @
d53167d2
...
...
@@ -349,8 +349,8 @@
'''
#'
__rcs_id__
=
'$Id: DT_In.py,v 1.3
0 1998/09/14 22:03:3
2 jim Exp $'
__version__
=
'$Revision: 1.3
0
$'
[
11
:
-
2
]
__rcs_id__
=
'$Id: DT_In.py,v 1.3
1 1998/10/21 14:58:1
2 jim Exp $'
__version__
=
'$Revision: 1.3
1
$'
[
11
:
-
2
]
from
DT_Util
import
ParseError
,
parse_params
,
name_param
,
str
from
DT_Util
import
render_blocks
,
InstanceDict
...
...
@@ -384,7 +384,10 @@ class InClass:
self
.
args
=
args
has_key
=
args
.
has_key
if
has_key
(
'sort'
):
self
.
sort
=
args
[
'sort'
]
if
has_key
(
'sort'
):
self
.
sort
=
sort
=
args
[
'sort'
]
if
sort
==
'sequence-item'
:
self
.
sort
=
''
if
has_key
(
'mapping'
):
self
.
mapping
=
args
[
'mapping'
]
for
n
in
'start'
,
'size'
,
'end'
:
if
has_key
(
n
):
self
.
batch
=
1
...
...
@@ -439,6 +442,10 @@ class InClass:
if
self
.
elses
:
return
render_blocks
(
self
.
elses
,
md
)
return
''
if
type
(
sequence
)
is
type
(
''
):
raise
'InError'
,
(
'Strings are not allowed as input to the in tag.'
)
section
=
self
.
section
params
=
self
.
args
...
...
@@ -587,6 +594,10 @@ class InClass:
if
self
.
elses
:
return
render_blocks
(
self
.
elses
,
md
)
return
''
if
type
(
sequence
)
is
type
(
''
):
raise
'InError'
,
(
'Strings are not allowed as input to the in tag.'
)
section
=
self
.
section
mapping
=
self
.
mapping
...
...
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