OT Re: [Zope-DB] writing a template to test if the sql worked
Philip Kilner
phil at xfr.co.uk
Fri May 7 06:29:27 EDT 2004
Hi Chris,
Chris Withers wrote:
>> Re. ZPT, well all my stuff is "inside" (e.g. in, or called by)
>> index_html, which is a ZPT.
>
> That sounds odd. The usual method I use is a ZPT-based form that calls a
> getData method that pull info for the form fields out of the REQUEST or
> stored data, which submits to a "processing" script tha tdoes
> validation, and edit/add, and the nreturns either the form ZPT if there
> wer eproblems or wherever seems most natural to go in other
> circumstances...
>
I'll send you a link when I've done my "how-to" - those parts of the
design not driven by my own limitations are mostly driven by the
objective of using formulator in a completely generic way.
>> by a universal "form rendering ZPT", called in turn by the top-level ZPT,
>
> Whaat does this "call" look like? Seems very odd...
>
Clumsy way of phrasing it on my part. It's a macro.
>> the next form in the sequence is thrown. At the end of the sequence,
>> instead of the form-rendering ZPT being called a "result" ZPT is called,
>
> That should be a PythonScript...
>
The script is called by the "result" ZPT.
>> All forms submit to ".", which equates - in my misty understanding -
>> to "self" - e.g. index_html, which in turn calls the script.
>
> Bzzzt. Bad, IMHO. Always have URLs as form actions to avoid surprises.
>
Generally I would agree - explicit better than implicit, and all that.
In this case, the need to make it generic is a factor.
Do you mean *full* URL?
> Well, it's pretty simple to call ZPT's from Python Scripts... what seems
> to be the problem?
>
I found a script calling a ZPT which called another script did my brain
in, both conceptually (it's inelegant), and practically (name space
issues - I'm a newbie at this, and it was soaking up too much of my time).
--
Regards,
PhilK
Email: phil at xfr.co.uk / Voicemail & Facsimile: 07092 070518
"The lyf so short, the craft so long to learne" - Chaucer
More information about the Zope-DB
mailing list