[Zope] Newbie questions
fowlertrainer at anonym.hu
fowlertrainer at anonym.hu
Mon Dec 1 04:38:25 EST 2003
Hello Zope-Masters !
Please help me with some examples/answers !
1.)
I cannot show results of Z-SQL method.
I see the examples on web, on tutorial, but...
ZSQL method name: testgroup.
select id,name from inst_group
Under KInterBase Connection, the test show the results.
But if I wrinte into index.html:
...
<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.
I do it with another tables, and another databases (ex. Gadfly) to
avoid possible IB errors/bugs.
But no result.
Why ? What I do wrong ?
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 !
3.)
There is an (K)InterBase Connection.
I want to access the IB specials.
These are:
- start transaction/Commit/Rollback, more if possible
- call stored procs
- set the transactions isolation level
How to I do it under Zope ?
I have an examples ?
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 ?
5.)
I wan to log in users under zope just like php.
This is the logical scheme (pseudo):
browser session handling on
handler:
if mainsession is empty:
result=
form
username/pwd
/form
submit button
elif:
get submitted form
check username/pwd
if wrong:
result=errorform
else:
mainsession set to(userid,username,otherdatas)
result=mainform for logined user
So: the login form is one the main form, but some menus are disabled.
When user have been logined, the menus are enabled.
The checking is based on ZSQL method (select check).
The questions are:
- how to I do it under Zope, to Zope use the Session ID like PHP, and
how to I write the session datas to session variable(s); and how to
load/get values from it ?
- how to I force Zope to the logined user is set to an existing zope
user (only one for all logined user). I don't want to duplicate the
user management into zope, I want to use my usernames in my IB
database.
6.)
Under Zope I how to create/set an variable in PyScript what useable
in DTML ? So how to set more DTML variables under PyScript ?
(example: dtml_username='xxx'; dtml_func="8"; etc.)
or only I do it only with one with this:
<dtml-var expr="myscript">
myscript.return(vmi)
?
7.)
If I write this:
<dtml-var expr="myzsqlmethod">
I get all of results of the method ?
8.)
What is the ZSQL method caching (1000 row)?
Is this an data packet size ?
How to I get more records ?
Can you show an example (not the Book's Batch, please show another) ?
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:
c:\test.xml
file://localhost/C:/test.xml
Thanx for any help, examples, links.
But please: don't say to I read the main book, every day I do, but
my special questions I cannot found in it.
KK
--
Best regards,
fowlertrainer mailto:fowlertrainer at anonym.hu
More information about the Zope
mailing list