tpnguyen schrieb:
> Hi,
> 
> I tried to use the TurboGears 2 TreeView example , but I got the error
> below:
> 
> UndefinedError: <pylons.util.ContextObj at 0x268b770
> action=u'routes_placeholder', controller=u'root', controller_url='',
> environ={'routes.route': <routes.route.Route object at
> 0x00EB2550>, ...ate'}, form_errors={}, form_values={}, identity=None,
> pylons=<pylons.util.PylonsContext object at 0x0268B7D0>,
> start_response=<function repl_start_response at 0x02674670>,
> url=u'about'> has no member named "tree"
> 
> Looks like tmpl_context has no member named "tree". Am I missing
> anything here? Please shed a light on how to debug this? Thanks much
> in advance.

I don't know pylons that well, but to me, the tmpl_context always 
behaved like this: if a key wasn't existant, it returned an empty string 
(somebody said PHP here?).

So I'd expect your error to be "AttributeError: string-object has no 
attribute display".

That might indicate that you are using the wrong context object here? 
Just guessing - I never imported the context from pylons, instead via tg.

from tg import tmpl_context as c

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