[Twisted-web] how to redirect to another url
Michal Pasternak
michal at pasternak.in
Mon Sep 5 06:45:57 MDT 2005
Dnia Monday 05 September 2005 12:15, Alberto Trujillo napisał:
> Could anybody tell me what I must change in the next code to do an
> automatic redirection of url.
Here comes an untested solution... I think it will work:
> 30 # content = '2;URL=' + href
content = [ '2;URL=', href ]
You shouldn't add URLOverlay and str object. Just return them from render_
method, and it will be treated in the right way.
Of course, everything depends on your render method :) If it looks like
"return str(data['content'])", well, it still will not work :^)
--
m
More information about the Twisted-web
mailing list