[Checkins] SVN: z3c.form/trunk/ Don't render 3xx responses
Wichert Akkerman
wichert at wiggy.net
Fri Feb 26 10:28:36 EST 2010
On 2/26/10 16:23 , Martin Aspeli wrote:
> Modified: z3c.form/trunk/src/z3c/form/form.py
> ===================================================================
> --- z3c.form/trunk/src/z3c/form/form.py 2010-02-26 15:12:48 UTC (rev 109471)
> +++ z3c.form/trunk/src/z3c/form/form.py 2010-02-26 15:23:23 UTC (rev 109472)
> @@ -211,6 +211,11 @@
>
> def __call__(self):
> self.update()
> +
> + # Don't render anything if we are doing a redirect
> + if self.request.response.getStatus() in (300, 301, 302, 303, 304, 305, 307,):
> + return u''
Why not check for getStatus%100==2 ? Is there any reason to render the
page if you already have a 400 or 500 response for example?
Wichert.
More information about the checkins
mailing list