Skip to content
Snippets Groups Projects
Commit 3d6cc1f458e6 authored by Sylvain Thénault's avatar Sylvain Thénault
Browse files

nicer doc'

parent 2500754fe3cc
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment