Skip to content

Instantly share code, notes, and snippets.

@mac01021
Created December 4, 2012 19:34
Show Gist options
  • Select an option

  • Save mac01021/4207823 to your computer and use it in GitHub Desktop.

Select an option

Save mac01021/4207823 to your computer and use it in GitHub Desktop.
repoze.bfg confusion
if 'bfg.routes.matchdict' in environ:
matchdict = environ['bfg.routes.matchdict']
path = matchdict.get('traverse', '/')
subpath = matchdict.get('subpath', '')
subpath = tuple(filter(None, subpath.split('/')))
else:
# this request did not match a Routes route
subpath = ()
try:
path = environ['PATH_INFO'] or '/'
except KeyError:
path = '/'
try:
.
.
.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment