doc/book/devweb/views/reledit.rst
changeset 12879 7347715bf0ee
parent 10491 c67bcee93248
equal deleted inserted replaced
12878:ec05a333f02c 12879:7347715bf0ee
   134 .. sourcecode:: python
   134 .. sourcecode:: python
   135 
   135 
   136     from cubicweb.web.views import reledit
   136     from cubicweb.web.views import reledit
   137 
   137 
   138     class DeactivatedAutoClickAndEditFormView(reledit.AutoClickAndEditFormView):
   138     class DeactivatedAutoClickAndEditFormView(reledit.AutoClickAndEditFormView):
   139 	def _should_edit_attribute(self, rschema):
   139         def _should_edit_attribute(self, rschema):
   140 	    return False
   140             return False
   141 
   141 
   142 	def _should_edit_attribute(self, rschema, role):
   142         def _should_edit_attribute(self, rschema, role):
   143 	    return False
   143             return False
   144 
   144 
   145     def registration_callback(vreg):
   145     def registration_callback(vreg):
   146 	vreg.register_and_replace(DeactivatedAutoClickAndEditFormView,
   146         vreg.register_and_replace(DeactivatedAutoClickAndEditFormView,
   147 				  reledit.AutoClickAndEditFormView)
   147                                   reledit.AutoClickAndEditFormView)
   148 
   148 
   149 
   149