Robert Brewer wrote:
>> While it's simple enough for me to modify
cpmodpy.py to
>> allow for get_options on the req object, I'd rather
find
>> a way to pass this information without requiring my
users
>> to modify their CherryPy installations.
>
> I'd probably just wrap _cpmodpy.handler:
>
> # mycpapp.py
> from cherrypy import _cpmodpy
>
> _isSetUp = False
> def mphandler(req):
> global _isSetUp
> if not _isSetUp:
>
load_conf_file(req.get_options()['myapp.config_file'])
> _isSetUp = True
> return _cpmodpy.handler(req)
Robert,
Thanks, that seems to work for what I needed it to do.
Thanks!
--Patrick
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "cherrypy-users" group.
To post to this group, send email to cherrypy-users googlegroups.com
To unsubscribe from this group, send email to
cherrypy-users-unsubscribe googlegroups.com
For more options, visit this group at h
ttp://groups.google.com/group/cherrypy-users?hl=en
-~----------~----~----~----~------~----~------~--~---
|