def__call__(self, *args, **kargs):"""Makes our controller a callable to handle requests
This is called when dispatched to as the Controller class docs explain
more fully.
"""
self._req = pylons.request.current_obj()
# Keep private methods privateif self._req.environ['pylons.routes_dict'].get('action').startswith('_'):
return pylons.Response(code=404)
ifhasattr(self, '__before__'):
self._inspect_call(self.__before__, **kargs)
response = self._dispatch_call()
ifhasattr(self, '__after__'):
self._inspect_call(self.__after__)
return response