router: Correctly generate application-relative URLs
parent
648623772c
commit
0ab44ed7ea
|
@ -231,8 +231,8 @@ class Generator(object):
|
||||||
'''
|
'''
|
||||||
|
|
||||||
path = '/'.join(str(s) for s in segments)
|
path = '/'.join(str(s) for s in segments)
|
||||||
if not path.startswith('/'):
|
while path.startswith('/'):
|
||||||
path = '/' + path
|
path = path[1:]
|
||||||
|
|
||||||
url = self.request.relative_url(path, to_application=True)
|
url = self.request.relative_url(path, to_application=True)
|
||||||
if self.path_only:
|
if self.path_only:
|
||||||
|
|
Loading…
Reference in New Issue