django-orchestra/orchestra/contrib/websites/utils.py

6 lines
145 B
Python
Raw Normal View History

2015-03-10 21:51:10 +00:00
def normurlpath(path):
if not path.startswith('/'):
path = '/' + path
path = path.rstrip('/')
return path.replace('//', '/')