web/views/autoform.py
changeset 5594 fe7d84363d23
parent 5590 a56eb02f9ce7
parent 5592 41ad8ca3047e
child 5627 a7e40cccdc9b
--- a/web/views/autoform.py	Wed May 26 14:37:32 2010 +0200
+++ b/web/views/autoform.py	Wed May 26 15:46:27 2010 +0200
@@ -125,6 +125,7 @@
 
 from logilab.mtconverter import xml_escape
 from logilab.common.decorators import iclassmethod, cached
+from logilab.common.deprecation import deprecated
 
 from cubicweb import typed_eid, neg_role, uilib
 from cubicweb.schema import display_name
@@ -646,6 +647,18 @@
     # action on the form tag
     _default_form_action_path = 'validateform'
 
+    # pre 3.8.3 compat
+    @property
+    def set_action(self, action):
+        self._action = action
+    @deprecated('[3.9] use form.form_action()')
+    def get_action(self):
+        try:
+            return self._action
+        except AttributeError:
+            return self._cw.build_url(self._default_form_action_path)
+    action = property(get_action, set_action)
+
     @iclassmethod
     def field_by_name(cls_or_self, name, role=None, eschema=None):
         """return field with the given name and role. If field is not explicitly