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
04d1d82d
Commit
04d1d82d
authored
Mar 08, 2001
by
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merged DM's fix for batching info
parent
972410ff
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
25 deletions
+27
-25
lib/python/DocumentTemplate/DT_In.py
lib/python/DocumentTemplate/DT_In.py
+27
-25
No files found.
lib/python/DocumentTemplate/DT_In.py
View file @
04d1d82d
...
...
@@ -382,8 +382,8 @@
'''
#'
__rcs_id__
=
'$Id: DT_In.py,v 1.4
5 2001/02/13 11:58:26 mj
Exp $'
__version__
=
'$Revision: 1.4
5
$'
[
11
:
-
2
]
__rcs_id__
=
'$Id: DT_In.py,v 1.4
6 2001/03/08 18:35:39 brian
Exp $'
__version__
=
'$Revision: 1.4
6
$'
[
11
:
-
2
]
from
DT_Util
import
ParseError
,
parse_params
,
name_param
,
str
from
DT_Util
import
render_blocks
,
InstanceDict
,
ValidationError
,
VSEval
,
expr_globals
...
...
@@ -577,16 +577,19 @@ class InClass:
append
=
result
.
append
validate
=
md
.
validate
for
index
in
range
(
first
,
end
):
if
index
==
first
and
index
>
0
:
pstart
,
pend
,
psize
=
opt
(
0
,
index
+
overlap
,
# preset
kw
[
'previous-sequence'
]
=
0
kw
[
'next-sequence'
]
=
0
# now more often defined then previously
#
if
index
==
first
or
index
==
last
:
# provide batching information
if
first
>
0
:
pstart
,
pend
,
psize
=
opt
(
0
,
first
+
overlap
,
sz
,
orphan
,
sequence
)
kw
[
'previous-sequence'
]
=
1
if
index
==
first
:
kw
[
'previous-sequence'
]
=
1
kw
[
'previous-sequence-start-index'
]
=
pstart
-
1
kw
[
'previous-sequence-end-index'
]
=
pend
-
1
kw
[
'previous-sequence-size'
]
=
pend
+
1
-
pstart
else
:
kw
[
'previous-sequence'
]
=
0
if
index
==
last
:
try
:
# The following line is a sneaky way to
# test whether there are more items,
...
...
@@ -594,8 +597,7 @@ class InClass:
sequence
[
end
]
pstart
,
pend
,
psize
=
opt
(
end
+
1
-
overlap
,
0
,
sz
,
orphan
,
sequence
)
kw
[
'previous-sequence'
]
=
0
kw
[
'next-sequence'
]
=
1
if
index
==
last
:
kw
[
'next-sequence'
]
=
1
kw
[
'next-sequence-start-index'
]
=
pstart
-
1
kw
[
'next-sequence-end-index'
]
=
pend
-
1
kw
[
'next-sequence-size'
]
=
pend
+
1
-
pstart
...
...
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