From eac7c470021b647d63c2e2af8acd6cebd738f2a4 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Thu, 19 Nov 2009 10:44:55 +0000 Subject: Rearrange things to try to avoid circular import deps. --- repoze/bfg/traversal.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'repoze/bfg/traversal.py') diff --git a/repoze/bfg/traversal.py b/repoze/bfg/traversal.py index 325e41e4b..b46fb83c7 100644 --- a/repoze/bfg/traversal.py +++ b/repoze/bfg/traversal.py @@ -632,3 +632,12 @@ class TraversalContextURL(object): def _join_path_tuple(tuple): return tuple and '/'.join([quote_path_segment(x) for x in tuple]) or '/' +class DefaultRootFactory: + __parent__ = None + __name__ = None + def __init__(self, request): + matchdict = getattr(request, 'matchdict', {}) + # provide backwards compatibility for applications which + # used routes (at least apps without any custom "context + # factory") in BFG 0.9.X and before + self.__dict__.update(matchdict) -- cgit v1.2.3