[mod_python] changing publisher `content' before sent to client

Jaime Wyant programmer.py at gmail.com
Tue Jan 16 13:41:29 EST 2007


I must be missing something obvious here...

But, I want the publisher to continue mapping URLS like it is doing now.  Is
there some way to have the publisher do this, but automagically call some
other function (like index below) before doing a req.write?

jw

On 1/16/07, Jorey Bump <list at joreybump.com> wrote:
>
> Jaime Wyant wrote:
> > Actually, I need to perform string manipulation on *everything* that
> > gets handled by publisher.  I don't want to manually edit each function
> > that the handler exposes.
> >
> > FWIW, I'm doing this because I would like to have two versions of my
> > website ->
> >
> > test.mysite.com
> > real.mysite.com
>
> def index(req)
>      body = do_stuff_with_your_modules(req)
>      return body.replace("test.mysite.com", "real.mysite.com")
>
>
>
>


-- 
"Government does not solve problems; it subsidizes them."
Ronald Reagan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mm_cfg_has_not_been_edited_to_set_host_domains/pipermail/mod_python/attachments/20070116/cde6d6b3/attachment.html


More information about the Mod_python mailing list