django-orchestra-test/orchestra/apps/websites/utils.py

6 lines
145 B
Python

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