Jordan Baker wrote:
Hi I'm writing some somewhat convoluted ZPT that should work tho,
<tr tal:repeat="row python:range(2)"> <td align="center" tal:repeat="plate python:plates[row * 2:(row * 2) + 2]"> FORMAT CONTENT </td> </tr>
Zope is giving me an error complaining about a missing __getslice__
If I create the following template based on your code it runs fine. It may be a problem with whatever your 'plates' object is in the second tal:repeat. <html> <head> <title tal:content="template/title">The title</title> </head> <body> <table> <div tal:define="plates string:slkfdjlskdjfldskjsdfsdfsdfsdff"> <tr tal:repeat="row python:range(2)"> <td align="center" tal:repeat="plate python:plates[row * 2:(row* 2) + 2]"> <div tal:replace="plate"></div> </td> </tr> </div> </table> </body> </html>