Mercurial > hg > lxmlmiddleware
diff lxmlmiddleware/middleware.py @ 3:ca1f58f5bad4
pass a webob request and response to the manipulate method, API change, bumping version
author | k0s <k0scist@gmail.com> |
---|---|
date | Tue, 26 Jan 2010 22:57:00 -0500 |
parents | bb7d50d54cb6 |
children |
line wrap: on
line diff
--- a/lxmlmiddleware/middleware.py Sun Jan 24 23:13:03 2010 -0500 +++ b/lxmlmiddleware/middleware.py Tue Jan 26 22:57:00 2010 -0500 @@ -36,7 +36,7 @@ return response(environ, start_response) # manipulate the DOM - environ['lxml.etree'] = self.manipulate(environ, environ['lxml.etree']) + environ['lxml.etree'] = self.manipulate(request, response, environ['lxml.etree']) # recompose the DOM if the last in the chain if environ['lxml.recomposer'] is self: @@ -46,7 +46,7 @@ return response(environ, start_response) - def manipulate(self, environ, tree): + def manipulate(self, environ, response, tree): """manipulate the DOM; should return an etree._Element""" return tree