web/views/editcontroller.py
changeset 8041 81794aa0c8b4
parent 8034 b07d61090706
child 8128 0a927fe4541b
equal deleted inserted replaced
8039:1fe90d4ec307 8041:81794aa0c8b4
    36 class IEditControlAdapter(EntityAdapter):
    36 class IEditControlAdapter(EntityAdapter):
    37     __needs_bw_compat__ = True
    37     __needs_bw_compat__ = True
    38     __regid__ = 'IEditControl'
    38     __regid__ = 'IEditControl'
    39     __select__ = is_instance('Any')
    39     __select__ = is_instance('Any')
    40 
    40 
    41     @deprecated()
       
    42     def __init__(self, _cw, **kwargs):
    41     def __init__(self, _cw, **kwargs):
    43         warn('[3.14] IEditControlAdapter is deprecated, override EditController'
    42         if self.__class__ is not IEditControlAdapter:
    44              ' using match_edited_type or match_form_id selectors for example.',
    43             warn('[3.14] IEditControlAdapter is deprecated, override EditController'
    45              DeprecationWarning)
    44                  ' using match_edited_type or match_form_id selectors for example.',
       
    45                  DeprecationWarning)
    46         super(IEditControlAdapter, self).__init__(_cw, **kwargs)
    46         super(IEditControlAdapter, self).__init__(_cw, **kwargs)
    47 
    47 
    48     @implements_adapter_compat('IEditControl')
    48     @implements_adapter_compat('IEditControl')
    49     def after_deletion_path(self):
    49     def after_deletion_path(self):
    50         """return (path, parameters) which should be used as redirect
    50         """return (path, parameters) which should be used as redirect