django-orchestra-test/orchestra/contrib/websites/utils.py
2015-04-05 10:46:24 +00:00

6 lines
145 B
Python

def normurlpath(path):
if not path.startswith('/'):
path = '/' + path
path = path.rstrip('/')
return path.replace('//', '/')