comparison taginthemiddle/middleware.py @ 15:1701e5b0b0eb

* stub manipulate method * remove default data adding
author Jeff Hammel <jhammel@mozilla.com>
date Wed, 05 May 2010 22:47:46 -0700
parents 8fb20b780341
children 57ca873ed9bf
comparison
equal deleted inserted replaced
14:86118cd8912e 15:1701e5b0b0eb
65 else: 65 else:
66 if self.app: 66 if self.app:
67 return self.app(environ, start_response) 67 return self.app(environ, start_response)
68 handler = exc.HTTPNotFound 68 handler = exc.HTTPNotFound
69 69
70 # add navigation links to handler [example]
71 if hasattr(handler, 'data'):
72 handler.data.setdefault('links', [])
73 for h in self.handlers:
74 handler.data['links'].append((handler.link(h.handler_path),
75 h.__name__))
76
77 # get response 70 # get response
78 res = handler() 71 res = handler()
79 return res(environ, start_response) 72 return res(environ, start_response)
73
74 def manipulate(self, request, response, tree):
75 return tree