diff options
| author | Chris McDonough <chrism@agendaless.com> | 2008-07-04 20:00:59 +0000 |
|---|---|---|
| committer | Chris McDonough <chrism@agendaless.com> | 2008-07-04 20:00:59 +0000 |
| commit | 8f88693600edebb522b6d078691e72a0dcbdb287 (patch) | |
| tree | b2171add39cce18f42085f88f84e9a2a6b42e542 /repoze/bfg/interfaces.py | |
| parent | 8b2c67309a9a3f9cf709bf3003dc3275f17c709e (diff) | |
| download | pyramid-8f88693600edebb522b6d078691e72a0dcbdb287.tar.gz pyramid-8f88693600edebb522b6d078691e72a0dcbdb287.tar.bz2 pyramid-8f88693600edebb522b6d078691e72a0dcbdb287.zip | |
Depend on zope.component
Use an adapter to perform traversal.
Diffstat (limited to 'repoze/bfg/interfaces.py')
| -rw-r--r-- | repoze/bfg/interfaces.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/repoze/bfg/interfaces.py b/repoze/bfg/interfaces.py index 711ea44cc..b6d7ff623 100644 --- a/repoze/bfg/interfaces.py +++ b/repoze/bfg/interfaces.py @@ -4,7 +4,14 @@ class IWSGIApplication(Interface): def __call__(environ, start_response): """ Represent a WSGI (PEP 333) application """ -class IPolicy(Interface): - def __call__(root, environ): +class ITraversalPolicy(Interface): + def __call__(environ, root): """ Return a tuple in the form (context, name, subpath) """ +class ITraverser(Interface): + def __init__(context): + """ Accept a context """ + + def __call__(environ, name): + """ Return a subcontext or based on name """ + |
