author | Sylvain Thénault <sylvain.thenault@logilab.fr> |
Fri, 24 Jul 2009 19:41:10 +0200 | |
changeset 2503 | c4bf7ef8b851 |
parent 2459 | d088d0ff48a1 |
permissions | -rw-r--r-- |
1977
606923dff11b
big bunch of copyright / docstring update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
1802
diff
changeset
|
1 |
""" |
606923dff11b
big bunch of copyright / docstring update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
1802
diff
changeset
|
2 |
|
606923dff11b
big bunch of copyright / docstring update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
1802
diff
changeset
|
3 |
:organization: Logilab |
606923dff11b
big bunch of copyright / docstring update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
1802
diff
changeset
|
4 |
:copyright: 2001-2009 LOGILAB S.A. (Paris, FRANCE), license is LGPL v2. |
606923dff11b
big bunch of copyright / docstring update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
1802
diff
changeset
|
5 |
:contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr |
606923dff11b
big bunch of copyright / docstring update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
1802
diff
changeset
|
6 |
:license: GNU Lesser General Public License, v2.1 - http://www.gnu.org/licenses |
606923dff11b
big bunch of copyright / docstring update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
1802
diff
changeset
|
7 |
""" |
0 | 8 |
|
9 |
class Folder2(MetaUserEntityType): |
|
10 |
"""folders are used to classify entities. They may be defined as a tree. |
|
11 |
When you include the Folder entity, all application specific entities |
|
12 |
may then be classified using the "filed_under" relation. |
|
13 |
""" |
|
14 |
name = String(required=True, indexed=True, internationalizable=True, |
|
15 |
constraints=[UniqueConstraint(), SizeConstraint(64)]) |
|
2459
d088d0ff48a1
move RichString and co to yams, keeping only a small monkeypatch for cw-page-template here
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
1977
diff
changeset
|
16 |
description = RichString(fulltextindexed=True) |
0 | 17 |
|
18 |
filed_under2 = BothWayRelation( |
|
19 |
SubjectRelation('Folder2', description=_("parent folder")), |
|
20 |
ObjectRelation('*'), |
|
21 |
) |
|
22 |
||
23 |
||
24 |
class filed_under2(MetaUserRelationType): |
|
25 |
"""indicates that an entity is classified under a folder""" |
|
26 |
# is_about has been renamed into filed_under |
|
27 |
#//* is_about Folder |
|
28 |
#* filed_under Folder |
|
1802
d628defebc17
delete-trailing-whitespace + some copyright update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
0
diff
changeset
|
29 |