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

2007-12-27 Thread Andreas Jung



--On 27. Dezember 2007 11:54:27 +0100 Rakotomandimby Mihamina 
[EMAIL PROTECTED] wrote:





Okay. I tried on Gadfly in order to test my SQL statements.
But are Product's *.py files (those in the Products FS directory) also
restricted that way?


You don't need that (and you don't want that).
Use a DA and ZSQL methods.

Andreas

pgpnAOSART9N1.pgp
Description: PGP signature
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


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

2007-12-26 Thread Andreas Jung



--On 27. Dezember 2007 01:59:10 +0100 Rakotomandimby Mihamina 
[EMAIL PROTECTED] wrote:



Hi,
I would like to learn about using Gadfly, on a very little application.


Consider using a *real* database. Gadfly is a toy and it will be removed
in Zope 2.11.

And of course you're right: it is a well known fact that PythonScript
are restricted on imports and doing other stuff. That's why we have *trusted
codde* in form of external methods, Zope products and browser views.

In addition: your code does not make much sense from the architectural 
point of view. Zope has a DB abstraction layer with ZSQL methods. If you do 
execute SQL code directly this way, be doomed. Please read the RDBMS

of The Zope Book 2.7 edition (use Google).

Andreas

pgpKRNvzLmGYq.pgp
Description: PGP signature
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


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

2007-12-26 Thread Rakotomandimby Mihamina

Andreas Jung wrote:
I would like to learn about using Gadfly, on a very little application. 

Consider using a *real* database. Gadfly is a toy and it will be removed
in Zope 2.11.


Okay.


And of course you're right: it is a well known fact that PythonScript
are restricted on imports and doing other stuff. That's why we have 
*trusted code* in form of external methods, Zope products 


Okay. I tried on Gadfly in order to test my SQL statements.
But are Product's *.py files (those in the Products FS directory) also 
restricted that way?


In addition: your code does not make much sense from the architectural 
point of view. Zope has a DB abstraction layer with ZSQL methods.


I really want to use ZPT+Python on the thing I am developping.
Is there any hint to have:
  ZQSL Methods - Python Sscript - ZPT

Thank you for all.
I am going to have a look at the ZOpe book, as you said.

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )