[Twisted-web] Rendering error messages
Michael Wilson
michael.wilson at gmail.com
Wed Dec 15 08:23:04 MST 2004
Hi,
That makes sense, but I want to emit a message _per field_, thus, if 4
things are wrong (school exists, bad address, etc, etc), each _field_
will have an error next to it. annoter.ValidateError gives me one
message on one line, correct?
On Wed, 15 Dec 2004 06:53:12 -0800, Donovan Preston <dp at ulaluma.com> wrote:
>
> On Dec 14, 2004, at 4:54 PM, Michael Wilson wrote:
>
> > if self.schoolDb.exists( name ):
> > self.nameError = 'School already exists!'
> > return
>
> I'm pretty sure you'll have a much easier time with this problem if you
> just use the formless error-handling mechanism, which takes care of all
> the error state handling for you. Try something like this:
>
> raise annotate.ValidateError(dict(name='School already exists!'))
>
> Instead of everything you described in your message.
>
> dp
>
>
More information about the Twisted-web
mailing list