#854: Request - Startup Hook
--------------------------------+-------------------------------------------
 Reporter:  [EMAIL PROTECTED]  |        Owner:  anonymous
     Type:  enhancement         |       Status:  new      
 Priority:  normal              |    Milestone:           
Component:  CherryPy            |      Version:  0.9a5    
 Severity:  normal              |   Resolution:           
 Keywords:                      |  
--------------------------------+-------------------------------------------
Comment (by [EMAIL PROTECTED]):

 OK.  I patched startup.py myself

 this now supports 3 arguments in app.cfg

 {{{
 # filter to preprend to the list
 tg.udf_cpfilter_pre = 'appname.module.filtername'

 # filter to append to the list
 tg.udf_cpfilter_post = 'appname.module.filtername'

 # function to call on startup
 tg.udf_startup = 'appname.module.functionname'
 }}}

 if someone can do a better job, please do.  this was the only way i could
 push stuff into cherrypy though - before startup is called in start-
 appname.py, cherrypy.root isn't declared.  elsewhere in the app , we're  a
 request only phase

 the filters seem good where they are, but there might be a better place
 for the udf (user defined function) startup function - perhaps later in
 the request , right before we enter the reactor loop - not sure where that
 happens though

-- 
Ticket URL: <http://trac.turbogears.org/turbogears/ticket/854>
TurboGears <http://www.turbogears.org/>
TurboGears front-to-back web development
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears Tickets" 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/turbogears-tickets
-~----------~----~----~----~------~----~------~--~---

Reply via email to