Standalone ZPT and Batch

R

Richard Wesley

I am busy converting a single Zope page to a Python cgi using the
standalone ZPT implementation from sourceforge. Most of it seems to
work just fine, but I am finding that although the Batch object is
available and ported(?), it does not seem to work.

Whenever I try to access batch/next/first with a short list, the
renderer complains that next.first is not defined. The ZPT codes looks
like this

....
batch python:modules['ZUtils'].Batch(...);
next batch/next
....

<a tal:condition="next" tal:attributes="...next/first..."...>

Looking at Batch.py, it appears that Batch.next is actually a
LazyNextBatch object, which only defines the Zope-specific __of__
operator. This makes sense, but I am rather surprised that standalone
ZTP does not handle this correctly in Expressions.py

Anyone have any suggestions about how to fix this?

TIA,

--

- rmgw

<http://www.trustedmedianetworks.com/>

----------------------------------------------------------------------------
Richard Wesley Trusted Media Networks, Inc.

"There's nothing intellectual about wandering around Italy
in a big shirt, trying to get laid."
- Rowan Atkinson, "Black Adder:Ink and Incapability"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top