changeset 2:041958c8c8f2

use paste.fileapp as the fileserver
author k0s <k0scist@gmail.com>
date Tue, 27 Oct 2009 15:37:00 -0400
parents 93ab6d1968bd
children ea5a5ef8ae2e ec7abd0a57d9
files decoupage/decoupage.py setup.py
diffstat 2 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/decoupage/decoupage.py	Mon Sep 07 20:41:42 2009 -0400
+++ b/decoupage/decoupage.py	Tue Oct 27 15:37:00 2009 -0400
@@ -7,7 +7,7 @@
 from genshi.builder import Markup
 from genshi.template import TemplateLoader
 from martini.config import ConfigMunger
-from paste.urlparser import StaticURLParser
+from paste.fileapp import FileApp
 from pkg_resources import resource_filename
 from pkg_resources import iter_entry_points
 from webob import Request, Response, exc
@@ -39,7 +39,7 @@
         assert sum([os.path.isdir(directory) for directory in self.template_directories]) == len(self.template_directories)
 
         # static file server
-        self.fileserver = StaticURLParser(self.directory)
+        self.fileserver = FileApp
         
         # pluggable index data formatters
         self.formatters = {}
@@ -71,7 +71,8 @@
                 res = self.get(request)
                 return res(environ, start_response)
             else:
-                return self.fileserver(environ, start_response)
+                fileserver = self.fileserver(path)
+                return fileserver(environ, start_response)
         else:
             raise exc.HTTPNotFound()
 
--- a/setup.py	Mon Sep 07 20:41:42 2009 -0400
+++ b/setup.py	Tue Oct 27 15:37:00 2009 -0400
@@ -6,7 +6,7 @@
 except IOError:
     description = ''
 
-version = '0.1.4'
+version = '0.2'
 
 setup(name='decoupage',
       version=version,