Created
December 4, 2012 19:34
-
-
Save mac01021/4207823 to your computer and use it in GitHub Desktop.
repoze.bfg confusion
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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