Hello there,
truth is, I was not using Pylons since 0.9.7, but this piece of
documentation still seems relevant:

http://pylonshq.com/docs/en/1.0/configuration/#getting-information-from-configuration-files

So I have an auth.py file in /config which sets up, well, auth. It
takes three parameters from ini, auth.secret being the first. I call
it with config['auth.secret']. Of course, I ensured to put it in
development ini. But config dictionary doesn't read it. Here's
relevant portion of traceback:

  File "S:\share\projects\sources\myproject\myproject\config\auth.py",
line 17, in auth_midd
leware
    secret = config['auth.secret'],
  File "c:\pylons\lib\site-packages\paste-1.7.4-py2.5.egg\paste
\registry.py", li
ne 146, in __getitem__
    return self._current_obj()[key]
KeyError: 'auth.secret'

Here's what is in config dict just before the call:

{'pylons.app_globals': None,
'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.strict_tmpl_context': True,
'pylons.h': None,
'pylons.package': None, '
debug': False,
'pylons.response_options': {'headers': {'Pragma': 'no-cache',
                                                        'Cache-
Control': 'no-cache'},
                                        'errors': 'strict',
                                       'charset': 'utf-8',
                                       'content_type': 'text/html'},
 'pylons.tmpl_context_attach_args': False}

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" 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/pylons-discuss?hl=en.

Reply via email to