That's why I'd like to have the possibility to somehow influence the instantiation phase of my handlers. The easiest approach were constructor arguments, but there are others.
Is there anything preventing you from using a common superclass?
E.g.
class Foo(object):
def __init__(self):
# Perform your startup actions here, initializing web.ctx variables
from web.conf ones, etc.
# You have full access to the controller instance at this point
through `self`.
class MyController(Foo):
def GET(self):
pass
def POT(self):
pass
I've committed the __before__ and __after__ hooks in my object
dispatch controller; now to test them. :)
— Alice.
smime.p7s
Description: S/MIME cryptographic signature
