[Zope] Content Management

Dario Lopez-Kästen dario@ita.chalmers.se
Wed, 12 Feb 2003 22:59:24 +0100


----- Original Message -----
From: "Paul Winkler" <pw_lists@slinkp.com>
To: <zope@zope.org>
Sent: Wednesday, February 12, 2003 9:58 PM
Subject: Re: [Zope] Content Management


> On Wed, Feb 12, 2003 at 01:14:53PM -0700, Don Brooksby wrote:
> > Because in my reading of other emails that are posting to Zope, as
> > much info as possible is what is requested, so here are 2 dtml
> > methods where I am seeing the failures - no error pages are
> > displayed, it just tells me it was not successful writing.
>
> That's because you caught the errors in
> <dtml-try>...<dtml-except>...</dtml-try>.
>
> Test it again with ONLY the <dtml-call> that
> actually updates the table; in particular get
> rid of the tags I mentioned.
>
> That way you'll get a traceback with more information.
> Come back and post the traceback and maybe somebody
> can help you.


Also, Don, you really don't want to use DTML for that kind of stuff. Better
to direct the posting of the form to a pythons script ("Script (Python)" as
they are called in the ZMI) and then generate error messages form there and
then either redirecting to or calling a DTML-method to report
errors/success.

Doing all that in DTML is way to hard to be worth the effort - been there,
done that - and you'll be able to write code that traps errors in a much
nicer way than you can do in DTML - and as a bonus you will find that yopur
code will easier to write and debug.

My 2 <insert lowly currency here> worth.

/dario
- --------------------------------------------------------------------
Dario Lopez-Kästen, IT Systems & Services Chalmers University of Tech.