[z3-checkins] r42098 - z3/deliverance/DeliveranceVHoster/trunk/docs
ejucovy at codespeak.net
ejucovy at codespeak.net
Mon Apr 16 17:23:32 CEST 2007
Author: ejucovy
Date: Mon Apr 16 17:23:31 2007
New Revision: 42098
Modified:
z3/deliverance/DeliveranceVHoster/trunk/docs/openplans_hooks.py
Log:
* set domain_uris = [] to bypass initialized check
* don't assume we're going to a project in find_uri
Modified: z3/deliverance/DeliveranceVHoster/trunk/docs/openplans_hooks.py
==============================================================================
--- z3/deliverance/DeliveranceVHoster/trunk/docs/openplans_hooks.py (original)
+++ z3/deliverance/DeliveranceVHoster/trunk/docs/openplans_hooks.py Mon Apr 16 17:23:31 2007
@@ -35,6 +35,7 @@
if not match:
# Don't try to set up domains we don't recognize
print 'The domain %r cannot be recognized by the domain_regex %r' % (domain, domain_regex)
+ domain_info.remote_uris = []
return
project = match.group(1)
remote_uris = [
@@ -59,18 +60,22 @@
return remote_uri
zope_uri = app_conf['zope_uri']
task_tracker_uri = app_conf['task_tracker_uri']
- project = environ['HTTP_X_OPENPLANS_PROJECT']
+ project = environ.get('HTTP_X_OPENPLANS_PROJECT')
path_info = environ.get('PATH_INFO', '')
if path_info.startswith('/tasks'):
environ['HTTP_X_OPENPLANS_APPLICATION'] = 'tasktracker'
remote_uri = task_tracker_uri
# Move /tasks to SCRIPT_NAME
path_info_pop(environ)
- else:
+ elif project:
remote_uri = '%s/VirtualHostBase/http/%s/openplans/projects/%s/VirtualHostRoot' % (
zope_uri,
environ['HTTP_HOST'],
- project)
+ project )
+ else:
+ remote_uri = '%s/VirtualHostBase/http/%s/openplans/VirtualHostRoot' % (
+ zope_uri,
+ environ['HTTP_HOST'] )
return remote_uri
def should_theme_uri(remote_uri, environ, app_conf):
More information about the z3-checkins
mailing list