Massimo, this will still change "http://domain.com/welcome/user/index";
to "http://domain.com/welcome/user/view/index"; instead of "http://
domain.com/user/index".

Francisco, if I were you, with more functions in the controller, I
wouldn't do any url shortening and simply stay with /user/view/.
Because I don't think there is a way to setup routes without
explicitly listing the functions as below:

USER_FUNCTIONS = ["index", "create", "delete", "view"]

routes_in = (
  ("/user/(?!%s)(.+)" % "|".join(USER_FUNCTIONS), r"/welcome/user/view/
\1"),
  ("/(.+)", r"/welcome/\1")
)

routes_out = (
  ("/welcome/user/view/(.+)", r"/user/\1"),
  ("/welcome/(.+)", r"/\1")
)

Reply via email to