web/form.py
changeset 10688 fa29f3628a1b
parent 10662 10942ed172de
child 10907 9ae707db5265
equal deleted inserted replaced
10687:d394bfcd8c25 10688:fa29f3628a1b
    17 # with CubicWeb.  If not, see <http://www.gnu.org/licenses/>.
    17 # with CubicWeb.  If not, see <http://www.gnu.org/licenses/>.
    18 """abstract form classes for CubicWeb web client"""
    18 """abstract form classes for CubicWeb web client"""
    19 __docformat__ = "restructuredtext en"
    19 __docformat__ = "restructuredtext en"
    20 
    20 
    21 from warnings import warn
    21 from warnings import warn
       
    22 
       
    23 from six import add_metaclass
    22 
    24 
    23 from logilab.common.decorators import iclassmethod
    25 from logilab.common.decorators import iclassmethod
    24 from logilab.common.deprecation import deprecated
    26 from logilab.common.deprecation import deprecated
    25 
    27 
    26 from cubicweb.appobject import AppObject
    28 from cubicweb.appobject import AppObject
    72 class FieldNotFound(Exception):
    74 class FieldNotFound(Exception):
    73     """raised by field_by_name when a field with the given name has not been
    75     """raised by field_by_name when a field with the given name has not been
    74     found
    76     found
    75     """
    77     """
    76 
    78 
       
    79 @add_metaclass(metafieldsform)
    77 class Form(AppObject):
    80 class Form(AppObject):
    78     __metaclass__ = metafieldsform
       
    79     __registry__ = 'forms'
    81     __registry__ = 'forms'
    80 
    82 
    81     parent_form = None
    83     parent_form = None
    82     force_session_key = None
    84     force_session_key = None
    83     domid = 'form'
    85     domid = 'form'