Mercurial > hg > SimpleWiki
diff simplewiki/dispatcher.py @ 4:dd1c4916cbcd
[mq]: fileserver
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Tue, 07 Sep 2010 22:39:15 -0700 |
parents | 56ab6b90cd1a |
children | b2fbb4f982da |
line wrap: on
line diff
--- a/simplewiki/dispatcher.py Tue Sep 07 21:29:57 2010 -0700 +++ b/simplewiki/dispatcher.py Tue Sep 07 22:39:15 2010 -0700 @@ -5,7 +5,7 @@ import os -from handlers import GenshiRenderer, Index, Post +from handlers import GenshiRenderer, Index, Post, FileServer from genshi.template import TemplateLoader from paste.fileapp import FileApp @@ -30,7 +30,7 @@ assert self.directory and os.path.exists(self.directory), "Must specify an existing directory" # request handlers - self.handlers = [ Post, GenshiRenderer, Index ] + self.handlers = [ Post, GenshiRenderer, Index, FileServer ] # template loader self.template_dirs = self.template_dirs.split() @@ -57,13 +57,6 @@ else: handler = exc.HTTPNotFound - # add navigation links to handler [example] - if hasattr(handler, 'data'): - handler.data.setdefault('links', []) - for h in self.handlers: - handler.data['links'].append((handler.link(h.handler_path), - h.__name__)) - # get response res = handler() return res(environ, start_response)