[Zope3-Users] Call a Python method from a ZPT

2006-05-29 Thread Paolo Cilmo
Hi, i have to call a method of a package from a ZPT.  In Zope2, i make the Poll Product (Dev_Guide 2_4). In the example i can call "getVotesFor" method simply writing in ZPT (in ZMI) this line:  span tal:replace="python:context.poll1.getVotesFor(j)"/  and it works  In Zope3, i made the same product (package). From a ZPT page (in ZMI), i can call a method of Poll if the method don't take arguments, for example with:  span tal:replace="context/poll1/getQuestion"  where poll1 is an istance of Poll package and it is in the same folder of the ZPT page. This works because the method don't take arguments, i just wan't call a method with parameters in Zope3, writing something like:  span tal:replace="python:context.poll1.getVotesFor(j)"/  Please help me. Thanks   Chiacchiera con i tuoi amici in tempo reale!  http://it.yahoo.com/mail_it/foot/*http://it.messenger.yahoo.com ___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] How i can use SQLExpr in Five?

2006-02-03 Thread Paolo Cilmo
How i can use SQLExpr in Five? When i start zope2 i have this error:  ConfigurationError: ('Unknown directive', u'http://namespaces.zope.org/tales', u'expressiontype')  
		Yahoo! Mail: gratis 1GB per i messaggi, antispam, antivirus, POP3___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] Problems with form package and widget

2006-01-03 Thread Paolo Cilmo
Hi! I'm tryng to create in Zope3 a "select tag" with this code:   voc=SimpleVocabulary.fromValues(lst)   repository_choice=Choice(title=u'Repository',  vocabulary='voc')   repository_list=List(__name__='replist', title=u'Repositories',  description=u'The repositories',  value_type=repository_choice)   field = Int(__name__='numero', title=u'Nume
 ro',
 min=0, max=10)   request = TestRequest(form={'repository_list.replist': u'9'})   widget = SelectWidget(repository_list, request)   widget.hasInput()   widget.getInputValue()   a= widget().replace(' ', '\n ')   print a  n.b. lst is a generic list  but it take this error: __init__() takes exactly 4 arguments (3 given) How i correct this code? And, where i can find a GOOD document for using widget? Zope3 book is very bad... Please help me 
		Yahoo! Mail: gratis 1GB per i messaggi, antispam, antivirus, POP3___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] Help us! Calling a Python Script from ZPT

2005-10-29 Thread Paolo Cilmo
Hello! I've read all the Philipp book and Zope3book.
I've  visited whole zope.org site. In these books and
sites are explained a lot of things, but only for
developing new packages. I need to develop a site
using ZMI (Zope2 typical using) and especially i want
to develop this applications:
1- I've a package with a class and into the class a
method
2- with browser:addMenuItem in zcml i can insert a
package into zmi from add menu
3- I've a Page Template into ZMI
ASK: how i call from the Page Template the script,
passig parameters and to have a response from script?
Please help 






___ 
Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB 
http://mail.yahoo.it
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users