Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
comment
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cubicweb
cubes
comment
Commits
bb1159c90484
Commit
bb1159c90484
authored
15 years ago
by
Sylvain Thénault
Browse files
Options
Downloads
Patches
Plain Diff
some cube documentation with a screenshot
parent
d9acb46c2af3
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
__pkginfo__.py
+40
-3
40 additions, 3 deletions
__pkginfo__.py
doc/screenshot_comment_section.png
+0
-0
0 additions, 0 deletions
doc/screenshot_comment_section.png
with
40 additions
and
3 deletions
__pkginfo__.py
+
40
−
3
View file @
bb1159c9
...
...
@@ -8,7 +8,7 @@
version
=
'
.
'
.
join
(
str
(
num
)
for
num
in
numversion
)
license
=
'
LGPL
'
copyright
=
'''
Copyright (c) 2003-200
9
LOGILAB S.A. (Paris, FRANCE).
copyright
=
'''
Copyright (c) 2003-20
1
0 LOGILAB S.A. (Paris, FRANCE).
http://www.logilab.fr/ -- mailto:contact@logilab.fr
'''
author
=
"
Logilab
"
...
...
@@ -16,5 +16,19 @@
web
=
'
http://www.cubicweb.org/project/%s
'
%
distname
short_desc
=
"
comment component for the CubicWeb framework
"
long_desc
=
"""
This CubicWeb component provides threadable comments.
long_desc
=
"""
\
Summary
-------
The `comment` cube provides threadable comments feature.
Screenshots
-----------
Threadable comment view:
.. image:: cube_comment1.png
Usage
-----
...
...
@@ -20,5 +34,28 @@
CubicWeb is a semantic web framework, see http://www.cubicweb.org
This cube creates a new entity type called `Comment` which could basically be
read by every body but only added by application
'
s users.
It also defines a relation `comments` which provides the ability to add a
`Comment` which `comments` a `Comment`.
To use this cube, you want to add the relation `comments` on the entity type
you want to be able to comment. For instance, let
'
s say your cube defines a
schema for a blog. You want all the blog entries to be commentable.
Here is how to define it in your schema:
.. 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*
'
)
Once this relation is defined, you can post comments and view threadable
comments.
"""
from
os
import
listdir
...
...
This diff is collapsed.
Click to expand it.
doc/screenshot_comment_section.png
0 → 100644
+
0
−
0
View file @
bb1159c9
46.2 KiB
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment