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.
http://127.0.0.1:8000/list_posts_by_votes/16
16 = category id
I would like this url in place of.
http://127.0.0.1:8000/my_category_name

It's the same to show a post
http://127.0.0.1:8000/view_post/1507
1507 = post id
I would like this url in place of.
http://127.0.0.1:8000/my_category_name/my_post_name

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.

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to