Wednesday, May 2, 2012

How to remove leading and trailing slash (/)?

I am using request.path to return current url in django, it is returning /get/category.



I need it as get/category (without leading and trailing slash). I don't want to use string functions.



Any idea?





No comments:

Post a Comment