[mod_python] PSP Return

Daniel West dwmp at opti.cgi.net
Sat Mar 6 22:33:16 EST 2004


Works perfectly!!  Thank you!! :)

-Dan


At 10:12 PM 3/6/2004 -0500, you wrote:

>You might be able to:
>
>raise apache.SERVER_RETURN, apache.OK
>
>I haven't tested it, but I think it should work.
>
>On Sat, 6 Mar 2004, Daniel West wrote:
>
> >
> > Consider the following PSP code:
> >
> > <%
> > if(not form.has_key('good')):
> >      req.internal_redirect('/errors/missing_good.html')
> >      return apache.OK
> >
> > # Do database insertion here
> > # ...
> > %>
> > <html>
> > <body>
> > Successful form POST
> > </body>
> > </html>
> >
> >
> > The return apache.OK isn't valid there, but is there an
> > equivalent?  Internal redirects are great for keeping error pages simple
> > and for hiding implementation details from the end user.  Plus you cannot
> > redirect a POST request with psp.redirect().
> >
> > -Dan
> >




More information about the Mod_python mailing list