List Info

Thread: Re: access to apache configuration variables under mod_python




Re: access to apache configuration variables under mod_python
country flaguser name
United States
2007-05-31 20:20:18
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-usersgooglegroups.com
To unsubscribe from this group, send email to
cherrypy-users-unsubscribegooglegroups.com
For more options, visit this group at h
ttp://groups.google.com/group/cherrypy-users?hl=en
-~----------~----~----~----~------~----~------~--~---


[1]

about | contact  Other archives ( Real Estate discussion Medical topics )