author | Katia Saurfelt <katia.saurfelt@logilab.fr> |
Wed, 01 Jul 2009 11:33:18 +0200 | |
branch | stable |
changeset 2212 | 201ce0d389f3 |
parent 1977 | 606923dff11b |
child 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 |
""" |
0 | 8 |
class Salesterm(EntityType): |
9 |
described_by_test = SubjectRelation('File', cardinality='1*', composite='subject') |
|
10 |
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
|
11 |
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
|
12 |
|
0 | 13 |
class tags(RelationDefinition): |
14 |
subject = 'Tag' |
|
1398
5fe84a5f7035
rename internal entity types to have CW prefix instead of E
sylvain.thenault@logilab.fr
parents:
0
diff
changeset
|
15 |
object = ('BlogEntry', 'CWUser') |
0 | 16 |
|
17 |
class checked_by(RelationType): |
|
18 |
subject = 'BlogEntry' |
|
1398
5fe84a5f7035
rename internal entity types to have CW prefix instead of E
sylvain.thenault@logilab.fr
parents:
0
diff
changeset
|
19 |
object = 'CWUser' |
0 | 20 |
cardinality = '?*' |
21 |
permissions = { |
|
22 |
'add': ('managers',), |
|
23 |
'read': ('managers', 'users'), |
|
24 |
'delete': ('managers',), |
|
25 |
} |