[Zope] Zope/SQL Application HowTo for newbies
Nick Bower
nicholas.bower at jrc.it
Wed Jun 23 11:34:24 EDT 2004
I was just catching up on some reading and after seeing some newbie
posts, I thought to mention this. A while ago I spent some time writing
a how-to on Zope and SQL integration for newbies. I found this part of
Zope (sticking zpt, script and zsql components together after
understanding what each did) to be quite difficult as a newbie.
http://zope.org/Members/nickbower/DataAppsHowTo
Just in case it helps some people out there. All disclaimers given.
Nick
Fernando Martins wrote:
> Hi,
>
> I'm creating a form which can be used to build queries by the user. It's not
> a general purpose query designer, but it involves a few tables and I'll have
> to create several quite different queries.
>
> I don't want to go through the trouble of manually preparing all the
> possible queries (ZSQL methods) in antecipation. I would like the form to
> call a PythonScript which will build the SQL statement and then _somehow_
> run it and _somehow_ return a second web page, a ZPT page which can use the
> results sequence to show it to the user.
>
> So, two questions:
>
> - how can I execute the SQL statement to get a sequence?
>
> - how can I send the second page built with the results from the
> PythonScript to the user?
> (I believe I can use 'options' in zpt to receive parameters from a Script,
> but I'm not sure this is the best option for this case).
>
> Another possibility would be to pass the SQL statement to the second ZPT
> page and run it there _somehow_. Hmm, using 'options' I could pass the SQL
> statement and in the ZPT page I can call a python script which executes the
> SQL statement and returns a sequence. But how can I have a Script executing
> a SQL statement?
>
> TIA,
> Fernando
More information about the Zope
mailing list