comparison captchamiddleware/middleware.py @ 8:59245309f054 default tip

conform to modern version of lxmlmiddleware
author k0s <k0scist@gmail.com>
date Fri, 26 Feb 2010 15:40:56 -0500
parents ce757057961c
children
comparison
equal deleted inserted replaced
7:8d826c3fbb06 8:59245309f054
73 # and reinsert them into the form so that users 73 # and reinsert them into the form so that users
74 # don't hate me ;) 74 # don't hate me ;)
75 75
76 return LXMLMiddleware.__call__(self, environ, start_response) 76 return LXMLMiddleware.__call__(self, environ, start_response)
77 77
78 def manipulate(self, environ, tree): 78 def manipulate(self, request, response, tree):
79 """manipulate the DOM; should return an etree._Element""" 79 """manipulate the DOM; should return an etree._Element"""
80
81 request = Request(environ)
82 80
83 # don't use CAPTCHAs for authorized users 81 # don't use CAPTCHAs for authorized users
84 if request.remote_user: 82 if request.remote_user:
85 return tree 83 return tree
86 84