[z3-checkins] r55565 - in z3/deliverance/sandboxes/paul/dvplone: etc lib

paul at codespeak.net paul at codespeak.net
Wed Jun 4 18:17:11 CEST 2008


Author: paul
Date: Wed Jun  4 18:17:10 2008
New Revision: 55565

Added:
   z3/deliverance/sandboxes/paul/dvplone/lib/dvplone.py
      - copied, changed from r55562, z3/deliverance/sandboxes/paul/dvplone/lib/dvswitcher.py
   z3/deliverance/sandboxes/paul/dvplone/lib/dvploneapp.py
Removed:
   z3/deliverance/sandboxes/paul/dvplone/lib/dvswitcher.py
Modified:
   z3/deliverance/sandboxes/paul/dvplone/etc/serve.ini
Log:
Make a wrapper around Paste static 

Modified: z3/deliverance/sandboxes/paul/dvplone/etc/serve.ini
==============================================================================
--- z3/deliverance/sandboxes/paul/dvplone/etc/serve.ini	(original)
+++ z3/deliverance/sandboxes/paul/dvplone/etc/serve.ini	Wed Jun  4 18:17:10 2008
@@ -14,14 +14,14 @@
 pipeline = egg:Paste#evalerror
 	 egg:Paste#httpexceptions
 	 dvng
-	 content
+	 dvplone
 
-[app:content]
-use = egg:Paste#static
+[app:dvplone]
+paste.app_factory = dvplone:make_dvplone
 document_root = %(here)s/../content
 
 [filter:dvng]
-paste.filter_app_factory = dvswitcher:make_dvng
+paste.filter_app_factory = dvplone:make_dvng
 
 [filter:deliverance]
 paste.filter_app_factory = deliverance.wsgimiddleware:make_filter

Copied: z3/deliverance/sandboxes/paul/dvplone/lib/dvplone.py (from r55562, z3/deliverance/sandboxes/paul/dvplone/lib/dvswitcher.py)
==============================================================================
--- z3/deliverance/sandboxes/paul/dvplone/lib/dvswitcher.py	(original)
+++ z3/deliverance/sandboxes/paul/dvplone/lib/dvplone.py	Wed Jun  4 18:17:10 2008
@@ -1,9 +1,15 @@
-"""WSGI middleware to switch Deliverance themes"""
+"""Factories for the filter and WSGI app"""
 
 from dvngfilter import DVNGFilter
+from dvploneapp import DVPlone
+
 
 def make_dvng(app, global_conf, **kw):
     """Choose which Deliverance theme should be used"""
 
     etcdir = global_conf['here']
     return DVNGFilter(app, etcdir)
+
+def make_dvplone(global_config, document_root, **local_conf):
+
+    return DVPlone(document_root)

Added: z3/deliverance/sandboxes/paul/dvplone/lib/dvploneapp.py
==============================================================================
--- (empty file)
+++ z3/deliverance/sandboxes/paul/dvplone/lib/dvploneapp.py	Wed Jun  4 18:17:10 2008
@@ -0,0 +1,7 @@
+"""WSGI App that pretends to be Plone + Deliverance"""
+
+from paste.urlparser import StaticURLParser
+
+class DVPlone(StaticURLParser):
+
+    pass

Deleted: /z3/deliverance/sandboxes/paul/dvplone/lib/dvswitcher.py
==============================================================================
--- /z3/deliverance/sandboxes/paul/dvplone/lib/dvswitcher.py	Wed Jun  4 18:17:10 2008
+++ (empty file)
@@ -1,9 +0,0 @@
-"""WSGI middleware to switch Deliverance themes"""
-
-from dvngfilter import DVNGFilter
-
-def make_dvng(app, global_conf, **kw):
-    """Choose which Deliverance theme should be used"""
-
-    etcdir = global_conf['here']
-    return DVNGFilter(app, etcdir)


More information about the z3-checkins mailing list