On Mon, Dec 13, 2010 at 3:41 PM, Mike Orr <[email protected]> wrote:
> Where is the config object and everything in pshell?
>
> $ paster shell development.ini MyApp
> ...
> "root" is the Pyramid app root object.
>>>> config
> NameError: name 'config' is not defined
>>>> dir()
> ['__builtins__', 'root']
>>>> dir(root)
> ['__doc__', '__init__', '__module__', '__name__', '__parent__']
>>>> sorted(root.keys())
> AttributeError: DefaultRootFactory instance has no attribute 'keys'
>>>> import pyramid.configuration
>>>> help(pyramid.configuration)
> # No 'get_config()' function or such listed.
>
> I want to see what's in config to see what I can print in a template
> and the syntax to get to it.
Erm, how do I get the config in a view?
def Admin(_Handler):
def error(self):
raise RuntimeError("intentional")
In the interactive traceback:
>>> self.request.config
AttributeError: 'Request' object has no attribute 'config'
>>> dir(self.request)
# Nothing useful
>>> sorted(self.request.keys())
# These are the same as the ``request.environ`` keys.
--
Mike Orr <[email protected]>
--
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.