Still no luck: getattr will work with arguments like 'pylons.environ', but I cannot find a way to access custom settings. I am using the [default] section in development.ini .
On Jun 23, 7:33 pm, percious <[email protected]> wrote: > Try using getattr instead of get. the TGConfig is a "Bunch" object. > > cheers. > -chris > > On Jun 23, 12:03 pm, Aly Merchant <[email protected]> wrote: > > > I'm having some trouble with accessing config parameters. The docs > > indicate that something like: > > > tg.config.get('mail.from.administrator', '[email protected]') > > > should work. However, I am not able to access anything I have set. > > I'm not sure if tg.config is supposed to be a dict but I am see it > > populated with: > > > {'pylons.c_attach_args': True, 'buffet.template_options': {}, > > 'pylons.request_options': {'errors': 'replace', 'decode_param_names': > > False, 'charset': 'utf-8', 'language': 'en-us'}, 'pylons.paths': > > {'controllers': None, 'templates': [], 'static_files': None, 'root': > > None}, 'pylons.environ_config': {'session': 'beaker.session', 'cache': > > 'beaker.cache'}, 'pylons.db_engines': {}, 'pylons.strict_c': False, > > 'pylons.h': None, 'pylons.package': None, 'debug': False, 'pylons.g': > > None, 'buffet.template_engines': [], 'pylons.response_options': > > {'headers': {'Pragma': 'no-cache', 'Cache-Control': 'no-cache'}, > > 'errors': 'strict', 'charset': 'utf-8', 'content_type': 'text/html'}} > > > This is with 2.0.1, I'm running in a virtualenv setup with the default > > "paster server development.ini" command. > > > Thanks, > > Aly > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears" 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?hl=en -~----------~----~----~----~------~----~------~--~---

