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 |
18 |
19 from yams.buildobjs import (EntityType, String, RichString, Bytes, |
19 from yams.buildobjs import (EntityType, String, RichString, Bytes, |
20 SubjectRelation, RelationDefinition) |
20 ComputedRelation, SubjectRelation, RelationDefinition) |
21 |
21 |
22 from cubicweb.schema import (WorkflowableEntityType, |
22 from cubicweb.schema import (WorkflowableEntityType, |
23 RQLConstraint, RQLVocabularyConstraint) |
23 RQLConstraint, RQLVocabularyConstraint) |
24 |
24 |
25 |
25 |
26 from cubicweb import _ |
26 from cubicweb import _ |
|
27 |
|
28 |
|
29 class buddies(ComputedRelation): |
|
30 rule = 'S in_group G, O in_group G' |
27 |
31 |
28 |
32 |
29 class Personne(EntityType): |
33 class Personne(EntityType): |
30 nom = String(required=True) |
34 nom = String(required=True) |
31 prenom = String() |
35 prenom = String() |