url rewriting and url mapping

9 views
Skip to first unread message

olivier hubert

unread,
Sep 15, 2014, 4:51:54 PM9/15/14
to web...@googlegroups.com
My application is a clone of Reddit clone app from Massimo.

This is the url I use to show all the posts in a category.
16 = category id
I would like this url in place of.

It's the same to show a post
1507 = post id
I would like this url in place of.

Is it possible to do that with routes?

I already add the routes.py in the root directory of web2py to simplify my url and use the language facilities.

routers = dict(
  BASE  = dict(default_application='my_app_name'),
  my_app_name = dict(languages=['en', 'fr'], default_language='fr'),
)

Thanks for your help.
Reply all
Reply to author
Forward
0 new messages