web/request.py
changeset 2650 18aec79ec3a3
parent 2613 5e19c2bb370e
child 2788 8d3dbe577d3a
child 3094 978ed8c2c0e4
equal deleted inserted replaced
2649:5d4a943695d1 2650:18aec79ec3a3
   537 
   537 
   538     @cached
   538     @cached
   539     def from_controller(self):
   539     def from_controller(self):
   540         """return the id (string) of the controller issuing the request"""
   540         """return the id (string) of the controller issuing the request"""
   541         controller = self.relative_path(False).split('/', 1)[0]
   541         controller = self.relative_path(False).split('/', 1)[0]
   542         registered_controllers = (ctrl.id for ctrl in
   542         registered_controllers = self.vreg['controllers'].keys()
   543                                   self.vreg.registry_objects('controllers'))
       
   544         if controller in registered_controllers:
   543         if controller in registered_controllers:
   545             return controller
   544             return controller
   546         return 'view'
   545         return 'view'
   547 
   546 
   548     def external_resource(self, rid, default=_MARKER):
   547     def external_resource(self, rid, default=_MARKER):