[Grok-dev] Re: Cancel button in forms
Martijn Faassen
faassen at startifact.com
Mon May 5 12:54:18 EDT 2008
Brandon Craig Rhodes wrote:
> Sebastian Ware <sebastian at urbantalk.se> writes:
>
>> This is not necessary. I only do:
>> ...
>> self.redirect(self.url(self.context))
>
> I get tired of writing self.redirect(self.url(...)). Given that
> redirection, by definition, is always to a URL, could we improve
> self.redirect() so that it always attempts to adapt its argument to a
> URL?
I think the task of redirection and the task of generating a URL are
quite different. the 'url' method is already quite magic in how it
handles parameters, and I'd rather not spread this magic around to other
things.
I guess we could define somethhing like "self.redirect_url(parameters
from url)" that does both but I find this kind of convenience risky;
it's not like this is the above is that hard to type.
Regards,
Martijn
More information about the Grok-dev
mailing list