Mercurial > hg > genshi_view
comparison genshi_view/template/+package+/handlers.py @ 8:af07c17c7b2f
pass app to Index handler
author | k0s <k0scist@gmail.com> |
---|---|
date | Fri, 06 Nov 2009 16:53:32 -0500 |
parents | 86df7b4dbc9c |
children | cb8ebcb8b4fd |
comparison
equal
deleted
inserted
replaced
7:55011632cf03 | 8:af07c17c7b2f |
---|---|
42 def redirect(self, location): | 42 def redirect(self, location): |
43 raise exc.HTTPSeeOther(location=location) | 43 raise exc.HTTPSeeOther(location=location) |
44 | 44 |
45 class GenshiHandler(Handler): | 45 class GenshiHandler(Handler): |
46 | 46 |
47 def __init__(self, request): | 47 def __init__(self, app, request): |
48 Handler.__init__(self, request) | 48 Handler.__init__(self, request) |
49 self.data = { 'request': request } | 49 self.data = { 'request': request } |
50 | 50 |
51 def __call__(self): | 51 def __call__(self): |
52 template = self.app.loader.load(self.template) | 52 template = self.app.loader.load(self.template) |