On Sep 9, 2007, at 9:00 AM, Andrey Gladilin wrote:

>
> I've created a new controller using paster.
> $ paster controller me
> But when I request this page /me/index it shows the 404 error.
> I've uncommented the line in config/routing.py
> map.connect(':controller/:action/:id', action='view')
> but it didn't help.
>
> What is the reason?

That line should be above  TG's default route:

map.connect('*url', controller='root', action='route')

so it has a higher preference. However, that will most probably cause  
side-effects because urls that should be routed to TG2's root  
controller might be matched by pylons' default route (ie:  
':controller/:action/:id').

Your best bet would be to manually create routes to your new pylons- 
like controllers:

map.connect('me/:action/:id', controller='me', action='view')

That route, placed above TG's, should match all urls beginning with "/ 
me" before being routed to TG's root controller.

HTH,

Alberto

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