summaryrefslogtreecommitdiff
path: root/repoze/bfg/interfaces.py
diff options
context:
space:
mode:
Diffstat (limited to 'repoze/bfg/interfaces.py')
-rw-r--r--repoze/bfg/interfaces.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/repoze/bfg/interfaces.py b/repoze/bfg/interfaces.py
index 7d4286ca3..80a6bda26 100644
--- a/repoze/bfg/interfaces.py
+++ b/repoze/bfg/interfaces.py
@@ -201,8 +201,14 @@ class IUnauthorizedAppFactory(Interface):
``message`` key in the WSGI environ provides information
pertaining to the reason for the unauthorized."""
-class IURLGenerator(Interface):
- """ A utility which provides virtual hosting services
+class IContextURL(Interface):
+ """ An adapter which deals with URLs related to a context.
"""
- def model_url(model, request):
- """ Return a URL that points to the model """
+ def virtual_root():
+ """ Return the virtual root related to a request and the
+ current context"""
+
+ def __call__():
+ """ Return a URL that points to the context """
+
+VH_ROOT_KEY = 'HTTP_X_VHM_ROOT'