25 |
25 |
26 from logilab.common.textutils import splitstrip |
26 from logilab.common.textutils import splitstrip |
27 |
27 |
28 from cubicweb import Binary, ValidationError, typed_eid |
28 from cubicweb import Binary, ValidationError, typed_eid |
29 from cubicweb.view import EntityAdapter, implements_adapter_compat |
29 from cubicweb.view import EntityAdapter, implements_adapter_compat |
30 from cubicweb.selectors import implements |
30 from cubicweb.selectors import is_instance |
31 from cubicweb.web import (INTERNAL_FIELD_VALUE, RequestError, NothingToEdit, |
31 from cubicweb.web import (INTERNAL_FIELD_VALUE, RequestError, NothingToEdit, |
32 ProcessFormError) |
32 ProcessFormError) |
33 from cubicweb.web.views import basecontrollers, autoform |
33 from cubicweb.web.views import basecontrollers, autoform |
34 |
34 |
35 |
35 |
36 class IEditControlAdapter(EntityAdapter): |
36 class IEditControlAdapter(EntityAdapter): |
37 __regid__ = 'IEditControl' |
37 __regid__ = 'IEditControl' |
38 __select__ = implements('Any') |
38 __select__ = is_instance('Any') |
39 |
39 |
40 @implements_adapter_compat('IEditControl') |
40 @implements_adapter_compat('IEditControl') |
41 def after_deletion_path(self): |
41 def after_deletion_path(self): |
42 """return (path, parameters) which should be used as redirect |
42 """return (path, parameters) which should be used as redirect |
43 information when this entity is being deleted |
43 information when this entity is being deleted |