author | Sylvain Thénault <sylvain.thenault@logilab.fr> |
Thu, 02 Jul 2009 12:57:11 +0200 | |
branch | stable |
changeset 2240 | ff84892900ac |
parent 1977 | 606923dff11b |
child 2459 | d088d0ff48a1 |
permissions | -rw-r--r-- |
1977
606923dff11b
big bunch of copyright / docstring update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
0
diff
changeset
|
1 |
""" |
606923dff11b
big bunch of copyright / docstring update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
0
diff
changeset
|
2 |
|
606923dff11b
big bunch of copyright / docstring update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
0
diff
changeset
|
3 |
:organization: Logilab |
606923dff11b
big bunch of copyright / docstring update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
0
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:
0
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:
0
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:
0
diff
changeset
|
7 |
""" |
0 | 8 |
from cubicweb.schema import format_constraint |
9 |
||
10 |
class Blog(EntityType): |
|
11 |
title = String(maxsize=50, required=True) |
|
12 |
description = String() |
|
13 |
||
14 |
class BlogEntry(EntityType): |
|
15 |
title = String(maxsize=100, required=True) |
|
16 |
publish_date = Date(default='TODAY') |
|
17 |
text_format = String(meta=True, internationalizable=True, maxsize=50, |
|
18 |
default='text/rest', constraints=[format_constraint]) |
|
19 |
text = String(fulltextindexed=True) |
|
20 |
category = String(vocabulary=('important','business')) |
|
21 |
entry_of = SubjectRelation('Blog', cardinality='?*') |