diff --git a/__pkginfo__.py b/__pkginfo__.py index 2500754fe3ccb1cdd2079b49ce0e3cb6958811af_X19wa2dpbmZvX18ucHk=..3d6cc1f458e659fa7ff1df77a0ac880ad2e692cc_X19wa2dpbmZvX18ucHk= 100644 --- a/__pkginfo__.py +++ b/__pkginfo__.py @@ -22,13 +22,6 @@ The `comment` cube provides threadable comments feature. -Screenshots ------------ - -Threadable comment view: - -.. image:: cube_comment1.png - Usage ----- @@ -44,14 +37,10 @@ .. sourcecode:: python - class Blog(EntityType): - title = String(maxsize=50, required=True) - description = RichString() - - class BlogEntry(EntityType): - title = String(required=True, fulltextindexed=True, maxsize=256) - content = RichString(required=True, fulltextindexed=True) - entry_of = SubjectRelation('Blog', cardinality='**') - comments = ObjectRelation('Comment', cardinality='1*') + from yams.buildobjs import RelationDefinition + class comments(RelationDefinition): + subject = 'Comment' + object = 'BlogEntry' + cardinality = '1*' Once this relation is defined, you can post comments and view threadable @@ -56,6 +45,6 @@ Once this relation is defined, you can post comments and view threadable -comments. +comments automatically on blog entry's primary view. """ from os import listdir