This morning I was attempting to set up custom routes to hookup a
pylons restcontroller following 
http://turbogears.org/2.0/docs/main/RoutesIntegration.html.

The problem is that overriding base_config.setup_routes in
app_config.py doesn't seem to work due to to the tg.util.bunch
implementation overriding __set_attr__. I have made a small testcase
to show the problem: http://pylonshq.com/pasties/1018.

A possible fix would be to modify bunch as follows:

@@ -82,7 +82,8 @@
         except KeyError:
             return get_partial_dict(name, self)

-    def __setattr__(self, name,  value):
+    def __setattr__(self, name,  value):
+        dict.__setattr__(self, name, value)
         dict.__setitem__(self, name, value)

     def __delattr__(self, name):

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears Trunk" 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-trunk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to