[z3-checkins] r41998 - in z3/deliverance/DeliveranceVHoster/trunk: . docs tests

ejucovy at codespeak.net ejucovy at codespeak.net
Wed Apr 11 20:23:37 CEST 2007


Author: ejucovy
Date: Wed Apr 11 20:23:36 2007
New Revision: 41998

Modified:
   z3/deliverance/DeliveranceVHoster/trunk/development.ini
   z3/deliverance/DeliveranceVHoster/trunk/docs/example_init_domain.py
   z3/deliverance/DeliveranceVHoster/trunk/docs/openplans_hooks.py
   z3/deliverance/DeliveranceVHoster/trunk/tests/test_init_func.py
Log:
 * merged zope_uri and zope_location conf settings
 * openplans hooks and conf settings for zope/tasktracker


Modified: z3/deliverance/DeliveranceVHoster/trunk/development.ini
==============================================================================
--- z3/deliverance/DeliveranceVHoster/trunk/development.ini	(original)
+++ z3/deliverance/DeliveranceVHoster/trunk/development.ini	Wed Apr 11 20:23:36 2007
@@ -12,12 +12,12 @@
 [server:main]
 use = egg:Paste#http
 host = 0.0.0.0
-port = 5000
+port = 8000
 
 [app:main]
 use = egg:DeliveranceVHoster
 data_dir = %(here)s/data
-debug_headers = true
+#debug_headers = true
 # To view bodies:
 #debug_bodies = true
 # To disable the rewriting of links:
@@ -29,7 +29,7 @@
 # WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT*
 # Debug mode will enable the interactive debugging tool, allowing ANYONE to
 # execute malicious code after an exception is raised.
-set debug = true
+set debug = false
 
 # To set a logger:
 #logger = /path/dvhoster.log
@@ -38,7 +38,17 @@
 
 [app:openplans]
 use = main
+### THIS IS IMPORTANT STUFF SPECIFIC TO OUR DEPLOYMENT ###
+
+rewrite_links = false
 clean_environ_headers_regex = ^HTTP_X_OPENPLANS
-init_domain = %(here)s/docs/example_init_domain.py
-zope_location = http://localhost:8080
-#default_theme_uri = ?
+init_domain = %(here)s/docs/openplans_hooks.py
+find_remote_uri = %(here)s/docs/openplans_hooks.py
+should_theme_uri = %(here)s/docs/openplans_hooks.py
+no_filter_zope = True
+zope_uri = http://localhost:5050
+task_tracker_uri = http://localhost:5000
+default_theme_uri = http://www.openplans.org
+domain_regex = ^(.*)\.flow\.openplans\.org$
+
+### END THIS IMPORTANT STUFF ###

Modified: z3/deliverance/DeliveranceVHoster/trunk/docs/example_init_domain.py
==============================================================================
--- z3/deliverance/DeliveranceVHoster/trunk/docs/example_init_domain.py	(original)
+++ z3/deliverance/DeliveranceVHoster/trunk/docs/example_init_domain.py	Wed Apr 11 20:23:36 2007
@@ -22,7 +22,7 @@
     project = match.group(1)
     remote_uri = (
         '%s/VirtualHostBase/http/%s:80/openplans/projects/%s/VirtualHostRoot'
-        % (app_conf['zope_location'],
+        % (app_conf['zope_uri'],
            domain,
            project))
     domain_info.remote_uris = [

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	Wed Apr 11 20:23:36 2007
@@ -13,24 +13,32 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <rules xmlns:xi="http://www.w3.org/2001/XInclude" xmlns="http://www.plone.org/deliverance" >
   <xi:include href="standardrules.xml" />
-  <copy theme="//*[@id='theme-content']" content="//*[@id='portal-columns']" />
+  <copy theme="//*[@id='content']" content="//*[@id='portal-columns']" />
+  <drop theme="//*[@id='tablemain']/tbody/tr[2]" />
+  <replace theme="//*[@id='tablemain']/tbody/tr[2]"
+           href="/@@opencore-topnav" content="//body/tr" />
+
 </rules>
 """
 
 def init_domain(domain_info, app_conf):
     r"""
-    Initializes an openplans project, based on a domain regular
-    expression (default ``^(.*)\.openplans\.org$`` but you can
-    override with the ``domain_regex`` config setting).
+    Initializes an openplans project based on a domain regular
+    expression which must be specified with the ``domain_regex``
+    config setting.
 
     Also requires a ``default_theme_uri`` setting.
     """
     domain = domain_info.domain
-    domain_regex = app_conf.get('domain_regex', r'^(.*)\.openplans\.org$')
+    domain_regex = app_conf['domain_regex']
     match = re.search(domain_regex, domain, re.I)
     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)
+        zope_uri = app_conf['zope_uri']
+        remote_uris = [{'path': '',
+                        'remote_uri': '%s/VirtualHostBase/http/%s/openplans/VirtualHostRoot/' % (zope_uri, domain)}]
+        domain_info.remote_uris = remote_uris
         return
     project = match.group(1)
     remote_uris = [

Modified: z3/deliverance/DeliveranceVHoster/trunk/tests/test_init_func.py
==============================================================================
--- z3/deliverance/DeliveranceVHoster/trunk/tests/test_init_func.py	(original)
+++ z3/deliverance/DeliveranceVHoster/trunk/tests/test_init_func.py	Wed Apr 11 20:23:36 2007
@@ -22,7 +22,7 @@
                     init_domain=example,
                     find_remote_uri=example,
                     should_theme_uri=example,
-                    zope_location='http://localhost:8080',
+                    zope_uri='http://localhost:8080',
                     default_theme_uri='http://openplans.org',
                     data_dir=data_filename,
                     logger='-')


More information about the z3-checkins mailing list