[Twisted-web] Rendering error messages
Michael Wilson
michael.wilson at gmail.com
Wed Dec 15 19:25:12 MST 2004
Wow, so I converted it over to work like examples/customform.py and it
works much better!
Two questions:
1. All forms/pages I have will have some constant headers, etc used
everywhere on the site. I'd like these to be maintainable by HTML
folks, so, if I don't want to use Stan, what's the suggested way to
create these and include them?
2. When I process a form and I want to put a message in the _forms_
error message field, how do I do that? I've tried dict keys of
"error", "form", etc, but none of them work.
Thanks for the tip! It forced me to go learn that stuff which I should
have done in the first place!
On Wed, 15 Dec 2004 07:42:21 -0800, Donovan Preston <dp at ulaluma.com> wrote:
>
> On Dec 15, 2004, at 7:23 AM, Michael Wilson wrote:
>
> > 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?
>
> Nope. That's why the first argument is a dict. Put as many error
> messages as you want in there, corresponding with the argument binding
> names.
>
> dp
>
>
More information about the Twisted-web
mailing list