web/views/autoform.py
changeset 5590 a56eb02f9ce7
parent 5557 1a534c596bff
parent 5588 377c9adfe81e
child 5594 fe7d84363d23
--- a/web/views/autoform.py	Tue May 25 11:51:48 2010 +0200
+++ b/web/views/autoform.py	Wed May 26 12:33:48 2010 +0200
@@ -643,6 +643,8 @@
     # set this to a list of [(relation, role)] if you want to explictily tell
     # which relations should be edited
     display_fields = None
+    # action on the form tag
+    _default_form_action_path = 'validateform'
 
     @iclassmethod
     def field_by_name(cls_or_self, name, role=None, eschema=None):
@@ -713,21 +715,6 @@
             return None
         return self.maxrelitems + 1
 
-    def action(self):
-        """return the form's action attribute. Default to validateform if not
-        explicitly overriden.
-        """
-        try:
-            return self._action
-        except AttributeError:
-            return self._cw.build_url('validateform')
-
-    def set_action(self, value):
-        """override default action"""
-        self._action = value
-
-    action = property(action, set_action)
-
     # autoform specific fields #################################################
 
     def _generic_relations_field(self):