On 12/18/05, Graham Ashton <[EMAIL PROTECTED]> wrote:
>
> I'm trying to access the cherrypy.request.params dictionary from within
> my controller, but it doesn't appear to exist. I realise that this
> dictionary is made available as **kwargs, but I wanted it available via
> a global variable so that I could write a function to handle it. I may
> be able to achieve the same result with decorators, but I'm not sure
> yet.

Is it cherrypy.request.paramMap? (You might try that... I can never
remember for sure)

> The cherrypy docs imply that they should all be available directly, so
> I'm wondering if it's been renamed in TurboGears. When I call "print
> dir(cherrypy.request)" inside my controller all I get back is this:
>
> ['__attrname__', '__delattr__', '__doc__', '__getattr__', '__init__',
> '__module__', '__setattr__', 'purge__']

I believe that this object is a special object, because it needs to
store its data distinctly for each thread. Note that there are
__getattr__ and __setattr__ hooks, so you never know what you'll get
when you look up an attribute there.

Kevin

Reply via email to