Am 06.06.2010 um 19:35 schrieb Victor:

Hi,

I try to add beaker_cache to some my exposed method on my page of TG2
site.  The beaker_cache works fine on the methods of root controller,
but not on sub-controllers'.
Here is the error:

"AttributeError: 'SiteController' object has no attribute
'_py_object'"

I notice there is a ticket which is similar to this problem, here is
the url:

http://trac.turbogears.org/ticket/2411

Is this problem a bug?  What's the best way to workaround this?

I think this is a problem with beakers implementation. It relies on a private implementation detail of pylons to work.

But as it is how it is, all you can do is to either re-write the decorator (as it is done apparently with other decorators in TG), or try & somehow create that _py_boject the beaker decorator needs. I have no idea what that means though, but a look at the other decorators might help.

Diez

--
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.

Reply via email to