routes_in = (
('/user/(?P<any>.*)', '/welcome/user/view/\g<any>'),
('/(?P<any>.*)', '/welcome/\g<any>'),
)
routes_out = (
('/welcome/user/view/(?P<any>.*)', '/user/\g<any>'),
('/welcome/(?P<any>.*)', '/\g<any>'),
)
the order is important .
On Sep 30, 4:47 am, Francisco Costa <[email protected]> wrote:
> Hello!
> I have this urlhttp://domain.com/welcome/user/view/usernamethat
> shows a user profile page.
>
> I've already get rid of the 'welcome application mae by using the
> following routes
>
> routes_in = (
> ('/(?P<any>.*)', '/welcome/\g<any>'),
> )
>
> routes_out = (
> ('/welcome/(?P<any>.*)', '/\g<any>'),
> )
>
> so the URL now ishttp://domain.com/user/view/username
>
> But I would like to improve this urls by cutting the 'view' function
> out so the url would behttp://domain.com/user/username
>
> What should I add to the routes?