On Monday 15 August 2011 20:52:42 Neal Holtz wrote:
>
> Is it possible to request an http redirect from within a macro
> handler?  Using moinmoin 1.9.3, when I try:
>
> def macro_Quiz( macro, filename ):
> ....
>           macro.request.http_redirect( 'http://www.disney.com', code=301 )
>
>
> <<Quiz: execution failed [proxy exception for
> <werkzeug.wrappers.BaseResponse object at 0xaacbb4c>] (see also the log)>>

What does the log say? I looked at some actions and you'd use the 
http_redirect method on the request in that environment, but I don't know if 
that works for macros, mostly because macros are executed during output 
production, at which point it's probably a bit late to attempt a redirect: 
the HTTP status code will have been set and page content partially written.

Paul

------------------------------------------------------------------------------
uberSVN's rich system and user administration capabilities and model 
configuration take the hassle out of deploying and managing Subversion and 
the tools developers use with it. Learn more about uberSVN and get a free 
download at:  http://p.sf.net/sfu/wandisco-dev2dev
_______________________________________________
Moin-user mailing list
Moin-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/moin-user

Reply via email to