I'm trying to get custom routes working in our TG2 app.  I read
through this old thread:
http://groups.google.com/group/turbogears/browse_thread/thread/16d446e0aa796778/a36120049cde432b
but I still don't know what I'm doing wrong or what's going on.  I get
the impression things have changed since then.

Does anyone have a working sample with custom routing that actually
works correctly?  I'm trying to route to a sub-controller in a subdir
of my controllers directory.

In app/controllers/sub/test.py:

class SomeTestController(BaseController):
    @expose()
    def foo(self, *args, **kw):
        return "hi"

In my overridden setup_routes():

    map.connect(None, '/test/:arg1/:arg2',
     controller = 'sub.test.SomeTestController',
     action = 'foo',
     conditions = dict(method = ['GET']))

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