| Jim Gallacher 2006-02-19, 5:45 pm |
| Graham Dumpleton wrote:
>
> On 19/02/2006, at 3:24 PM, Graham Dumpleton wrote:
>
>
>
> Hmmm, adding a stacked handler probably only makes sense for the current
> phase. Thus, perhaps just:
>
> def all(req):
> req.add_stacked_handler("page::header")
> req.add_stacked_handler("page::body")
> req.add_stacked_handler("page::footer")
> return apache.OK
>
> or if overloading is allowed:
>
> def all(req):
> req.add_handler(None,"page::header")
> req.add_handler(None,"page::body")
> req.add_handler(None,"page::footer")
> return apache.OK
>
> That no phase is listed means the current phase is used and it would be
> stacked.
>
> Too obscure???
Yes. There is a little too much magic there.
> If you allowed an independent handler stack to be added, maybe you need to
> allow a list as an alternative of just the handler string.
>
> def all(req):
> req.add_handler("PythonHandler",
> ["page::header","page::body","page::footer"])
> return apache.DECLINED
Is this intended as an alternative to add_stacked_handler or an
additional feature? If it's an alternative solution the I prefer it as
it seems more pythonic.
I don't have alot more to say on these last 2 emails. I think you are on
the right path here.
Jim
|