[Twisted-web] Re: How work formless?

Donovan Preston dp at ulaluma.com
Fri Jul 1 09:38:56 MDT 2005

On Jul 1, 2005, at 3:39 AM, Alberto Trujillo wrote:

> Thank you very much for your help Donovan. Now is working, but I  
> can't see any error messages if I introduce a string and not a  
> number. If I not worng, I should see that kind of message.
> Other question, if I want to sent the information from the form to  
> another page, How can I do it?

You should be seeing error messages -- that's the whole point of  
formless, automatic error handling. Maybe send me the code you are  
using and I'll take a look at it.

As far as redirecting to another page, if you really want that much  
control over what is happening I recommend you don't use formless at  
this time. However it is possible:

request.setComponent(iformless.IRedirectAfterPost, "http://foo.com/bar")

You'll need to put an annotate.Request() instance in your method  
signature in order to get at the request from your autocallable method.

This will all be completely changing at some point in the future,  
because the way things work currently is all really very stupid.  
Again, this is why I recommend people avoid using it at the moment.  
It's easier to do things by hand than learn all the weird workarounds  
in a system which is due for a complete overhaul sometime soon.


More information about the Twisted-web mailing list