wiki:StartupHook
Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Version 2 (modified by anonymous, 11 years ago) (diff)

need some clarifications :-P

turbogears has a call_on_startup and call_on_shutdown facility in turbogears.startup

from turbogears.startup import call_on_startup

def do_your_thing():
    ...

call_on_startup.append(do_your_thing)

you can do_your_thing and insert filters into the cherrypy request phase or set up variables as needed.

FAQ: Q- Where I put this code? In controller.py? In start-project.py? A-