|
View:
New views
4 Messages
—
Rating Filter:
Alert me
|
|
|
Application configCan somebody show how tu access application config outside the request process ? --~--~---------~--~----~------------~-------~--~----~ 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@... To unsubscribe from this group, send email to cherrypy-users+unsubscribe@... For more options, visit this group at http://groups.google.com/group/cherrypy-users?hl=en -~----------~----~----~----~------~----~------~--~--- |
|
|
Re: Application configKristaps Bulins wrote: > Can somebody show how to access application config outside the request > process ? app = cherrypy.tree.mount(Root(), '/apps/mine', conf) print app.config['/path']['hello'] ...or... print cherrypy.tree.apps['/apps/mine']['/path']['hello'] Robert Brewer fumanchu@... --~--~---------~--~----~------------~-------~--~----~ 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@... To unsubscribe from this group, send email to cherrypy-users+unsubscribe@... For more options, visit this group at http://groups.google.com/group/cherrypy-users?hl=en -~----------~----~----~----~------~----~------~--~--- |
|
|
Re: Application configFirst example works fine but other no. I got app = cherrypy.tree.mount(SApplication(), '/', "App.conf") print cherrypy.tree.apps['/'] and get KeyError['/'] On 20 sept., 20:29, "Robert Brewer" <fuman...@...> wrote: > Kristaps Bulins wrote: > > Can somebody show how to access application config outside the request > > process ? > > app = cherrypy.tree.mount(Root(), '/apps/mine', conf) > print app.config['/path']['hello'] > > ...or... > > print cherrypy.tree.apps['/apps/mine']['/path']['hello'] > > Robert Brewer > fuman...@... 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@... To unsubscribe from this group, send email to cherrypy-users+unsubscribe@... For more options, visit this group at http://groups.google.com/group/cherrypy-users?hl=en -~----------~----~----~----~------~----~------~--~--- |
|
|
Re: Application configI edited code and get it work like this app = cherrypy.tree.mount(SApplication(), '/', "App.conf") print cherrypy.tree.apps[''] .config['section'] --~--~---------~--~----~------------~-------~--~----~ 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@... To unsubscribe from this group, send email to cherrypy-users+unsubscribe@... For more options, visit this group at http://groups.google.com/group/cherrypy-users?hl=en -~----------~----~----~----~------~----~------~--~--- |
| Free embeddable forum powered by Nabble | Forum Help |