equal
deleted
inserted
replaced
42 |
42 |
43 .. autoclass:: cubicweb.web.uihelper.FormConfig |
43 .. autoclass:: cubicweb.web.uihelper.FormConfig |
44 |
44 |
45 """ |
45 """ |
46 |
46 |
47 |
|
48 from six import add_metaclass |
|
49 |
47 |
50 from logilab.common.deprecation import deprecated |
48 from logilab.common.deprecation import deprecated |
51 from cubicweb.web.views import uicfg |
49 from cubicweb.web.views import uicfg |
52 |
50 |
53 |
51 |
92 uicfg_aff.set_field(cls.etype, rtype, field) |
90 uicfg_aff.set_field(cls.etype, rtype, field) |
93 uicfg_affk.set_fields_order(cls.etype, cls.fields_order) |
91 uicfg_affk.set_fields_order(cls.etype, cls.fields_order) |
94 super(meta_formconfig, cls).__init__(name, bases, classdict) |
92 super(meta_formconfig, cls).__init__(name, bases, classdict) |
95 |
93 |
96 |
94 |
97 @add_metaclass(meta_formconfig) |
95 class FormConfig(metaclass=meta_formconfig): |
98 class FormConfig: |
|
99 """helper base class to define uicfg rules on a given entity type. |
96 """helper base class to define uicfg rules on a given entity type. |
100 |
97 |
101 In all descriptions below, attributes list can either be a list of |
98 In all descriptions below, attributes list can either be a list of |
102 attribute names of a list of 2-tuples (relation name, role of |
99 attribute names of a list of 2-tuples (relation name, role of |
103 the edited entity in the relation). |
100 the edited entity in the relation). |