On Jan 28, 2008 5:33 PM, Steven Holmes <[EMAIL PROTECTED]> wrote:
> @validate supports separating form rendering and form post processing
> into distinct methods. This is convenient, but has a nasty flaw: It
> requires two separate URLs, a form display URL and a URL to handle the
> post. When a form post fails to validate, the form is re-displayed,
> but at the post URL instead of the original form display URL. I find
> this inconsistent and broken.
There seem to be two philosophies about that. I agree with you, that it's
cleaner to have everything in one method with:
if form_submitted:
if not form_has_errors:
do action
display form
Quixote's form handling is like this. But Pylons and TurboGears users
generally seem to prefer it the other way, so that each method just
does one thing.
--
Mike Orr <[EMAIL PROTECTED]>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---