Hi all,

Today I have been bitten by a rather unexpected behaviour from
Turbogears 2 with the following code:

class UserController(BaseController):
    @expose('foo.templates.user')
    def default(self, user, **kwargs):
        print user
        return dict()


This controller works like a charm for this request: /user/ali.sabil
But produces a rather confusing result for /user/john.man

The problem comes from the fact that .man is a known filename
extension for a known mimetype, which leads the TG2
ObjectDispatchController to chop the extension off, and have user=john
in the controller.

I understand that this behaviour can be very useful in many scenarios,
but I think TG2 should provide a simple way to disable it completely.

Cheers,

--
Ali

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