Mercurial > hg > decoupage
view decoupage/utils.py @ 116:eac2c03c40ee default tip
bump version
author | Jeff Hammel <k0scist@gmail.com> |
---|---|
date | Fri, 30 Aug 2024 12:25:14 -0700 |
parents | cf18ea0313f9 |
children |
line wrap: on
line source
def link(request, path): """return a permalink""" base_url = request.application_url.rstrip('/') if not path: return base_url + '/' if not isinstance(path, basestring): path = '/'.join(path) return '%s/%s' % (base_url, path.lstrip('/'))