[Zope] Newbie questions

Gabriel Genellina gagenellina at softlab.com.ar
Mon Dec 1 15:13:36 EST 2003


At 1/12/2003 10:38, you wrote:

>     <dtml-in testgroup>
>      x
>       <li><dtml-var id>: <dtml-var name></li>
>     </dtml-in>
>     ...
>
>  then it is don't show the results. Why ? Every example do this way.

That should work. What do you see as a response? Other parts of the 
template (like a <dtml-if>) could prevent this to be evaluated.

>2.)
>  I want to process the result of zsql query under PythonScript (select
>  * from xxx).
>
>  How to I call this method from PythonScript ?
>  How to I get the result rows ?
>
>  Please show with an example !

See the Zope Book, chapter Relational Database Connectivity, there are 
examples. And see Appendix B, class ZSQLMethod too.
You call it as any other callable object, with (), including keyword 
arguments if applicable.
The return value is a sequence-like object, see the same souces, or 
http://www.zope.org/Members/spinwing/ZSQL_Results

>4.)
>  If there are two requests in zope, and the scripts are have
>  use (K)InterBase Connection, that the connection object is
>  duplicated ?
>  The ZSQL method objects are duplicated also ?
>  So: the requests' processes are separated ?

I'm not completely sure but there might be 4 connection objects created at 
the time (one per cache, if you run Zope using the default 4 threads).

>5.)
>  I wan to log in users under zope just like php.
>  This is the logical scheme (pseudo):

Try the CookieCrumbler product.

>7.)
>  If I write this:
>   <dtml-var expr="myzsqlmethod">
>
>   I get all of results of the method ?

Why don't you try it yourself and see what happens? Use 'View source" on 
the generated page.

>8.)
>  What is the ZSQL method caching (1000 row)?
>  Is this an data packet size ?
>  How to I get more records ?

See the Zope Book again, chapter Relational Database Connectivity.

>  Can you show an example (not the Book's Batch, please show another) ?

Those settings have nothing to do with batching.
In the 'Advanced' tab, you say how many rows (at maximum) you want to 
retrieve, and how many results set you want to store cached.

>9.)
>  How to I import XML file ?
>  I export my zope folder in home. I want to use another site.
>  But I cannot do import.
>  I try with these variations:

Read the Zope Book: "Using The Zope Management Interface" - "Importing and 
Exporting Objects"


Gabriel Genellina
Softlab SRL




More information about the Zope mailing list