comparison simplewiki/dispatcher.py @ 3:56ab6b90cd1a

[mq]: post
author Jeff Hammel <jhammel@mozilla.com>
date Tue, 07 Sep 2010 21:29:57 -0700
parents 2464e2051b78
children dd1c4916cbcd
comparison
equal deleted inserted replaced
2:2464e2051b78 3:56ab6b90cd1a
3 data persisting across requests should go here 3 data persisting across requests should go here
4 """ 4 """
5 5
6 import os 6 import os
7 7
8 from handlers import GenshiRenderer, Index 8 from handlers import GenshiRenderer, Index, Post
9 9
10 from genshi.template import TemplateLoader 10 from genshi.template import TemplateLoader
11 from paste.fileapp import FileApp 11 from paste.fileapp import FileApp
12 from pkg_resources import resource_filename 12 from pkg_resources import resource_filename
13 from webob import Request, Response, exc 13 from webob import Request, Response, exc
28 self.auto_reload = self.auto_reload.lower() == 'true' 28 self.auto_reload = self.auto_reload.lower() == 'true'
29 29
30 assert self.directory and os.path.exists(self.directory), "Must specify an existing directory" 30 assert self.directory and os.path.exists(self.directory), "Must specify an existing directory"
31 31
32 # request handlers 32 # request handlers
33 self.handlers = [ GenshiRenderer, Index ] 33 self.handlers = [ Post, GenshiRenderer, Index ]
34 34
35 # template loader 35 # template loader
36 self.template_dirs = self.template_dirs.split() 36 self.template_dirs = self.template_dirs.split()
37 self.template_dirs.append(resource_filename(__name__, 'templates')) 37 self.template_dirs.append(resource_filename(__name__, 'templates'))
38 self.loader = TemplateLoader(self.template_dirs, 38 self.loader = TemplateLoader(self.template_dirs,