we use return web.found('/') and it works jus fine

On Tue, Mar 31, 2009 at 5:32 PM, Juan Pablo Scaletti <
[email protected]> wrote:

>
> "raise" is the python way to throw an exception.
> Since web.py 0.3 the redirects like web.seeother() and web.found() are
> exceptions not functions.
>
> class foo:
>   def POST(self):
>       // do something
>        raise web.seeother("/new_url")
>
> On 31 mar, 15:48, paul jobs <[email protected]> wrote:
> > what does raise accomplish
> >
> > On 3/10/09, Andrew Gwozdziewycz <[email protected]> wrote:
> >
> >
> >
> >
> >
> > >  303 (See Other) was designed for redirecting after CGI Scripts. (
> > >http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3.4) and
> > > should be used in this situation.
> >
> > > 302 (Found) is meant for temporarily redirecting a user.
> > > 301 (Moved Permanently) well, that should be obvious.
> >
> > >  On Mar 10, 2009, at 3:41 AM, Anand Chitipothu wrote:
> >
> > > On Tue, Mar 10, 2009 at 12:01 PM, paul jobs <[email protected]>
> wrote:
> >
> > > class foo:
> > >    def POST(self):
> > >        // do something
> > >        return web.found("/new_url")
> >
> > > You can also use web.found, but return should be replaced with raise.
> >
> > > Looks like "302 Found" and "303 See Other" are used for the same
> purpose.
> > >http://en.wikipedia.org/wiki/HTTP_302
> >
> > >  --
> > >http://www.apgwoz.com
> >
> > --
> > BidEgg - Worlds best low price Auction sitehttp://bidegg.com
> >
> > BidEgg - Worlds best low price Auction site
> >
>


-- 
BidEgg - Worlds best low price Auction site
http://bidegg.com

BidEgg - Worlds best low price Auction site

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web.py" 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/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to