author | Adrien Di Mascio <Adrien.DiMascio@logilab.fr> |
Thu, 23 Jul 2009 15:17:11 +0200 | |
changeset 2455 | 5346d9f3d5ec |
parent 2438 | 576f4d51f826 |
permissions | -rw-r--r-- |
1977
606923dff11b
big bunch of copyright / docstring update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
1836
diff
changeset
|
1 |
""" |
606923dff11b
big bunch of copyright / docstring update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
1836
diff
changeset
|
2 |
|
606923dff11b
big bunch of copyright / docstring update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
1836
diff
changeset
|
3 |
:organization: Logilab |
606923dff11b
big bunch of copyright / docstring update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
1836
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:
1836
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:
1836
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:
1836
diff
changeset
|
7 |
""" |
2438
576f4d51f826
[cleanup] fix deprecation warnings
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
1977
diff
changeset
|
8 |
|
576f4d51f826
[cleanup] fix deprecation warnings
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
1977
diff
changeset
|
9 |
from yams.buildobjs import (EntityType, RelationDefinition, RelationType, String, |
576f4d51f826
[cleanup] fix deprecation warnings
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
1977
diff
changeset
|
10 |
Int, SubjectRelation) |
576f4d51f826
[cleanup] fix deprecation warnings
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
1977
diff
changeset
|
11 |
from yams.constraints import IntervalBoundConstraint |
576f4d51f826
[cleanup] fix deprecation warnings
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
1977
diff
changeset
|
12 |
|
0 | 13 |
class Salesterm(EntityType): |
14 |
described_by_test = SubjectRelation('File', cardinality='1*', composite='subject') |
|
15 |
amount = Int(constraints=[IntervalBoundConstraint(0, 100)]) |
|
1836
d3f0c6e868ef
fix StringField widget selection with SizeConstraint and StaticVocabularyConstraint constraints
Florent <florent@secondweb.fr>
parents:
1802
diff
changeset
|
16 |
reason = String(maxsize=20, vocabulary=[u'canceled', u'sold']) |
1802
d628defebc17
delete-trailing-whitespace + some copyright update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
1398
diff
changeset
|
17 |
|
0 | 18 |
class tags(RelationDefinition): |
19 |
subject = 'Tag' |
|
1398
5fe84a5f7035
rename internal entity types to have CW prefix instead of E
sylvain.thenault@logilab.fr
parents:
0
diff
changeset
|
20 |
object = ('BlogEntry', 'CWUser') |
0 | 21 |
|
22 |
class checked_by(RelationType): |
|
23 |
subject = 'BlogEntry' |
|
1398
5fe84a5f7035
rename internal entity types to have CW prefix instead of E
sylvain.thenault@logilab.fr
parents:
0
diff
changeset
|
24 |
object = 'CWUser' |
0 | 25 |
cardinality = '?*' |
26 |
permissions = { |
|
27 |
'add': ('managers',), |
|
28 |
'read': ('managers', 'users'), |
|
29 |
'delete': ('managers',), |
|
30 |
} |