equal
deleted
inserted
replaced
|
1 from cubicweb.schema import format_constraint |
|
2 |
|
3 class Folder2(MetaUserEntityType): |
|
4 """folders are used to classify entities. They may be defined as a tree. |
|
5 When you include the Folder entity, all application specific entities |
|
6 may then be classified using the "filed_under" relation. |
|
7 """ |
|
8 name = String(required=True, indexed=True, internationalizable=True, |
|
9 constraints=[UniqueConstraint(), SizeConstraint(64)]) |
|
10 description_format = String(meta=True, internationalizable=True, |
|
11 default='text/rest', constraints=[format_constraint]) |
|
12 description = String(fulltextindexed=True) |
|
13 |
|
14 filed_under2 = BothWayRelation( |
|
15 SubjectRelation('Folder2', description=_("parent folder")), |
|
16 ObjectRelation('*'), |
|
17 ) |
|
18 |
|
19 |
|
20 class filed_under2(MetaUserRelationType): |
|
21 """indicates that an entity is classified under a folder""" |
|
22 # is_about has been renamed into filed_under |
|
23 #//* is_about Folder |
|
24 #* filed_under Folder |
|
25 |