router: Correctly generate application-relative URLs

master
Dustin C. Hatch 2011-06-15 19:12:00 -05:00
parent 648623772c
commit 0ab44ed7ea
1 changed files with 8 additions and 8 deletions

View File

@ -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: