diff options
| author | Chris McDonough <chrism@agendaless.com> | 2010-02-06 14:53:21 +0000 |
|---|---|---|
| committer | Chris McDonough <chrism@agendaless.com> | 2010-02-06 14:53:21 +0000 |
| commit | a9f28d4f1322009f46e821819c389d69f3ae1b0c (patch) | |
| tree | 5a480329d32c02fa3856e9e67931f440a277a24a /repoze/bfg/traversal.py | |
| parent | 604ad175a411bcfa46bc0d625a4b2ab5809389a0 (diff) | |
| download | pyramid-a9f28d4f1322009f46e821819c389d69f3ae1b0c.tar.gz pyramid-a9f28d4f1322009f46e821819c389d69f3ae1b0c.tar.bz2 pyramid-a9f28d4f1322009f46e821819c389d69f3ae1b0c.zip | |
- Remove magical feature of ``repoze.bfg.url.model_url`` which
prepended a fully-expanded urldispatch route URL before a the
model's path if it was noticed that the request had matched a route.
This feature was ill-conceived, and didn't work in all scenarios.
Diffstat (limited to 'repoze/bfg/traversal.py')
| -rw-r--r-- | repoze/bfg/traversal.py | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/repoze/bfg/traversal.py b/repoze/bfg/traversal.py index 496b874a2..bce239d3f 100644 --- a/repoze/bfg/traversal.py +++ b/repoze/bfg/traversal.py @@ -628,19 +628,6 @@ class TraversalContextURL(object): if path.startswith(vroot_path): path = path[len(vroot_path):] - if 'bfg.routes.route' in environ: - route = environ['bfg.routes.route'] - matchdict = environ['bfg.routes.matchdict'].copy() - matchdict['traverse'] = path - try: - segments = route.generate(matchdict) - except KeyError, why: - raise KeyError( - "Couldn't generate URL for matchdict %r: %s" % - (matchdict, str(why))) - app_url = request.application_url - return app_url + segments - app_url = request.application_url # never ends in a slash return app_url + path |
