def __call__(self, environ, start_response): req = Request(environ) # Add some helpfull things to the request. req.user = users.get_current_user() req.user_is_admin = str(users.is_current_user_admin()) resp = req.get_response(self.app) return resp(environ, start_response)