[Zope] import ZGadflyDA.gadfly: Ext Method or Python Script?

Rakotomandimby Mihamina mihamina.rakotomandimby at etu.univ-orleans.fr
Wed Dec 26 19:59:10 EST 2007


Hi,
I would like to learn about using Gadfly, on a very little application.
I put this in a "Python Script":

     from Products.ZGadflyDA import gadfly
     connection = gadfly.gadfly("rktmb_db", "demo")
     cursor = connection.cursor()
     cursor.execute("select * from pointage")
     for x in cursor.fetchall():
         print x
     return printed

In a page template, I call that script. I try to view the page template,
then I am prompted for login and password (zope HTTP prompt), and my 
Zope manager login/pass is refused (re-prompted). If I cancel logging 
in, I get "unauthorized" because I am "not authorized to use ZGadflyDA 
in this context".
So, must I only use external methods (duh!)?  Or should I release some 
permission to make it OK?
I am running Zope 2.9.
Thank you.


More information about the Zope mailing list