perfetto.
L'errore e' proprio del tipo che ti ho detto prima.
in una tales expression di tipo python: i metodi vanno corredati di
parentesi....
sostituisci > <li tal:repeat="risultato
python:context.scriptidmultipagina">
con <li tal:repeat="risultato python:context.scriptidmultipagina()">
oppure con
<li tal:repeat="risultato context/scriptidmultipagina">
e vai tranquillo :)
bye
2010/3/25 TommyN <[email protected]>:
>
> Ti ringrazio prima di tutto per le info che mi dai. Smanettando a destra e
> sinistra comincio a capire il codice, sempre di più.
> Adesso lo script python è il seguente:
> # Import a standard function, and get the HTML request and response objects.
> from Products.PythonScripts.standard import html_quote
> request = container.REQUEST
> RESPONSE = request.RESPONSE
> contents = context.selectId()
> b_size = 30
> from Products.CMFPlone import Batch
> b_start = context.REQUEST.get('b_start', 0)
> batch = Batch(contents, b_size, int(b_start), orphan=0)
> return batch
> sembra ok, poichè in test mi restituisce questo:
> <Products.CMFPlone.PloneBatch.Batch object at 0xcc5bdec>
> mentre ZPT ha il seguente codice:
> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
> lang="en"
> metal:use-macro="here/main_template/macros/master"
> i18n:domain="plone">
> <body>
> <div metal:use-macro="here/batch_macros/macros/navigation" />
> <div metal:fill-slot="main">
>
> <h1>Lista Id</h1>
> <li tal:repeat="risultato python:context.scriptidmultipagina">
> ID
> </li>
> </div>
> </body>
> </html>
> ma mi restituisce il seguente codice
> Exception Type TypeError
> Exception Value iteration over non-sequence
> Questo vuol dire che l'oggetto restituito dallo script non è iterabile?
> --
> View this message in context:
> http://n2.nabble.com/Plone-Mysql-vista-di-una-semplice-select-tp4772130p4800748.html
> Sent from the Plone - Italy mailing list archive at Nabble.com.
>
>
> _______________________________________________
> Plone-IT mailing list
> [email protected]
> http://lists.plone.org/mailman/listinfo/plone-it
> http://www.nabble.com/Plone---Italy-f21728.html
>
--
bye
SauZheR
************************************
l'iterazione è umana...
la ricorsione, Divina!
************************************
reply to: sauzher AT gmail DOT com
_______________________________________________
Plone-IT mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/plone-it
http://www.nabble.com/Plone---Italy-f21728.html