Trying to figure out URL dispatcher for sluggale URLs like stackoverflow
- by TylerW
I'm using the Tornado framework (Python). I have the sluggable URLs working. But I have 3 different entries in the URL dispatcher. I was wondering if someone could help me transform it into one line.
This is what I have:
(r"/post/([0-9]+)/[a-zA-Z0-9\-]+", SpotHandler),
(r"/post/([0-9]+)/", SpotHandler),
(r"/post/([0-9]+)", SpotHandler),
I want it so that the following URLs all go to the same place.
http://domain.com/post/14
http://domain.com/post/14/
http://domain.com/post/14/any-text-it-doesnt-matter-what-it-is