equal
deleted
inserted
replaced
1 # copyright 2003-2014 LOGILAB S.A. (Paris, FRANCE), all rights reserved. |
1 # copyright 2003-2016 LOGILAB S.A. (Paris, FRANCE), all rights reserved. |
2 # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr |
2 # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr |
3 # |
3 # |
4 # This file is part of CubicWeb. |
4 # This file is part of CubicWeb. |
5 # |
5 # |
6 # CubicWeb is free software: you can redistribute it and/or modify it under the |
6 # CubicWeb is free software: you can redistribute it and/or modify it under the |
15 # |
15 # |
16 # You should have received a copy of the GNU Lesser General Public License along |
16 # You should have received a copy of the GNU Lesser General Public License along |
17 # with CubicWeb. If not, see <http://www.gnu.org/licenses/>. |
17 # with CubicWeb. If not, see <http://www.gnu.org/licenses/>. |
18 """Base class for entity objects manipulated in clients""" |
18 """Base class for entity objects manipulated in clients""" |
19 |
19 |
20 __docformat__ = "restructuredtext en" |
|
21 |
|
22 from warnings import warn |
20 from warnings import warn |
23 |
21 |
24 from six import text_type, string_types, integer_types |
22 from six import text_type, string_types, integer_types |
25 from six.moves import range |
23 from six.moves import range |
26 |
24 |
44 |
42 |
45 from cubicweb.uilib import soup2xhtml |
43 from cubicweb.uilib import soup2xhtml |
46 from cubicweb.mttransforms import ENGINE |
44 from cubicweb.mttransforms import ENGINE |
47 |
45 |
48 _marker = object() |
46 _marker = object() |
|
47 |
49 |
48 |
50 def greater_card(rschema, subjtypes, objtypes, index): |
49 def greater_card(rschema, subjtypes, objtypes, index): |
51 for subjtype in subjtypes: |
50 for subjtype in subjtypes: |
52 for objtype in objtypes: |
51 for objtype in objtypes: |
53 card = rschema.rdef(subjtype, objtype).cardinality[index] |
52 card = rschema.rdef(subjtype, objtype).cardinality[index] |