web/formfields.py
changeset 4443 83ff2bb898a5
parent 4395 e50b71c0dd87
child 4481 56440a1f816a
equal deleted inserted replaced
4442:7bc0e4ed4109 4443:83ff2bb898a5
     1 """field classes for form construction
     1 """Fields are used to control what's displayed in forms. It makes the link
       
     2 between something to edit and its display in the form. Actual display is handled
       
     3 by a widget associated to the field.
     2 
     4 
     3 :organization: Logilab
     5 :organization: Logilab
     4 :copyright: 2009-2010 LOGILAB S.A. (Paris, FRANCE), license is LGPL v2.
     6 :copyright: 2009-2010 LOGILAB S.A. (Paris, FRANCE), license is LGPL v2.
     5 :contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr
     7 :contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr
     6 :license: GNU Lesser General Public License, v2.1 - http://www.gnu.org/licenses
     8 :license: GNU Lesser General Public License, v2.1 - http://www.gnu.org/licenses
    44     return result
    46     return result
    45 
    47 
    46 _MARKER = object()
    48 _MARKER = object()
    47 
    49 
    48 class Field(object):
    50 class Field(object):
    49     """field class is introduced to control what's displayed in forms. It makes
    51     """This class is the abstract base class for all fields. It hold a bunch
    50     the link between something to edit and its display in the form. Actual
    52     of attributes which may be used for fine control of the behaviour of a
    51     display is handled by a widget associated to the field.
    53     concret field.
    52 
    54 
    53     Attributes
    55     All the attributes described below have sensible default value which may be
    54     ----------
       
    55     all the attributes described below have sensible default value which may be
       
    56     overriden by value given to field's constructor.
    56     overriden by value given to field's constructor.
    57 
    57 
    58     :name:
    58     :name:
    59        name of the field (basestring), should be unique in a form.
    59        name of the field (basestring), should be unique in a form.
    60     :id:
    60     :id: