changeset 1539:c92c8e5d68e3

make twisted server also use moin_static160 (like standalone)
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Tue, 12 Sep 2006 19:38:39 +0200
parents e051e6f51ade
children e61d8846ca2c
files MoinMoin/server/twistedmoin.py
diffstat 1 files changed, 6 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/server/twistedmoin.py	Tue Sep 12 19:34:28 2006 +0200
+++ b/MoinMoin/server/twistedmoin.py	Tue Sep 12 19:38:39 2006 +0200
@@ -46,6 +46,7 @@
 # Server globals
 config = None
 
+url_prefix_static = 'moin_static160'
 
 class WikiResource(resource.Resource):
     """ Wiki resource """
@@ -59,13 +60,13 @@
     """ Wiki root resource """
 
     def getChild(self, name, request):
-        # Serve images and css from '/wiki'
-        if request.prepath == [] and name == 'wiki':
+        # Serve images and css from url_prefix_static
+        if request.prepath == [] and name == url_prefix_static:
             return resource.Resource.getChild(self, name, request)
 
-        # Serve special 'root' files from '/wiki'
+        # Serve special 'root' files from url_prefix_static
         elif name in ['favicon.ico', 'robots.txt'] and request.postpath == []:
-            return self.children['wiki'].getChild(name, request)
+            return self.children[url_prefix_static].getChild(name, request)
 
         # All other through moin
 
@@ -242,7 +243,7 @@
     default = WikiRoot()
 
     # Here is where img and css and some special files come from
-    default.putChild('wiki', static.File(config.docs))
+    default.putChild(url_prefix_static, static.File(config.docs))
 
     # Generate the Site factory
     # TODO: Maybe we can use WikiRoot instead of this