equal
deleted
inserted
replaced
|
1 from cubicweb.schema import format_constraint |
|
2 |
|
3 class Blog(EntityType): |
|
4 title = String(maxsize=50, required=True) |
|
5 description = String() |
|
6 |
|
7 class BlogEntry(EntityType): |
|
8 title = String(maxsize=100, required=True) |
|
9 publish_date = Date(default='TODAY') |
|
10 text_format = String(meta=True, internationalizable=True, maxsize=50, |
|
11 default='text/rest', constraints=[format_constraint]) |
|
12 text = String(fulltextindexed=True) |
|
13 category = String(vocabulary=('important','business')) |
|
14 entry_of = SubjectRelation('Blog', cardinality='?*') |