> Isn't this what loadhooks is for?

Drat. Yes, it probably is. :-) Funny thing is, I'd seen that some time ago,
and forgotten about it and totally missed it again today when I implemented
my scheme above. My bad.

However, loadhooks and unloadhooks aren't attached to the request class ...
a feature that would be kinda cool, so you can do things like:

class RssReq:
    content_type = 'application/rss+xml'
    cacheable = False

class Rss(RssReq):
    def GET(self):
        ...

I.e., use inheritance from a base request class type to give you various
parameters like the Content-Type header. That's the advantage of
cls.__init__(), which I guess you can use in any case.

Okay, forget my original email. :-)

BTW, why is there both _load and load and loadhooks and _loadhooks? Couldn't
it all be one, and loadhooks would just get run after _load, after all the
ctx.variables were set up?

Thanks,
Ben.

-- 
Ben Hoyt, http://benhoyt.com/

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to