add MicroBlog entity
authorNicolas Chauvat <nicolas.chauvat@logilab.fr>
Tue, 28 Sep 2010 15:47:50 +0200
changeset 237 c5fdcaa505f6
parent 236 eb03943228a0
child 238 48dd5b221f71
add MicroBlog entity
migration/1.9.0_Any.py
schema.py
--- a/migration/1.9.0_Any.py	Tue Sep 28 15:39:54 2010 +0200
+++ b/migration/1.9.0_Any.py	Tue Sep 28 15:47:50 2010 +0200
@@ -1,2 +1,3 @@
+add_entity_type('MicroBlog')
 add_entity_type('MicroBlogEntry')
 add_entity_type('UserAccount')
--- a/schema.py	Tue Sep 28 15:39:54 2010 +0200
+++ b/schema.py	Tue Sep 28 15:47:50 2010 +0200
@@ -6,7 +6,6 @@
     description = RichString()
     rss_url = String(maxsize=128, description=_('blog\'s rss url (useful for when using external site such as feedburner)'))
 
-
 class BlogEntry(WorkflowableEntityType):
     __permissions__ = {
         'read': ('managers', 'users', ERQLExpression('X in_state S, S name "published"'),),
@@ -19,6 +18,9 @@
     entry_of = SubjectRelation('Blog')
     same_as = SubjectRelation('ExternalUri')
 
+class MicroBlog(EntityType):
+    title = String(maxsize=50, required=True)
+    description = RichString()
 
 class MicroBlogEntry(EntityType):
     __permissions__ = {
@@ -28,7 +30,7 @@
         'delete': ('managers', 'owners')
         }
     content = RichString(required=True, fulltextindexed=True)
-    entry_of = SubjectRelation('Blog')
+    entry_of = SubjectRelation('MicroBlog')
     same_as = SubjectRelation('ExternalUri')
 
 class UserAccount(EntityType):