[Grok-dev] How do I do a 301 Permanent Redirect?

Sebastian Ware sebastian at urbantalk.se
Sat Jan 24 15:55:39 EST 2009


The self.redirect(url) method on a view allways performs a "303 See  
Other" redirect, but if I want to send a "301 Permanent Redirect", how  
do I do this?

I have tried this

     self.response.setStatus(301, "Permanent redirect")
     self.redirect("%s" % self.url(o, 'index'))

But the setStatus doesn't seem to have any effect.

Mvh Sebastian




More information about the Grok-dev mailing list