No project description provided
Project description
ckanext-comments
Add comment-trees to CKAN pages
Requirements
- python >= 3.7
- CKAN >= 2.9
Installation
To install ckanext-comments:
-
Install python package
pip install ckanext-comments
-
Add
comments
to theckan.plugins
setting in your CKAN config file -
Apply database migrations
ckan db upgrade -p comments
-
Add
cooments/snippets/thread.html
to yourpackage/read.html
template, like this:{% ckan_extends %} {% block primary_content_inner %} {{ super() }} {% snippet 'comments/snippets/thread.html', subject_id=pkg.id, subject_type='package' %} {% endblock primary_content_inner %}
Config settings
# Require comment approval in order to make it visible
# (optional, default: true).
ckanext.comments.require_approval = false
# Editor(admin) can edit draft comments
# (optional, default: true).
ckanext.comments.draft_edits = true
# Editor(admin) can edit approved comments
# (optional, default: false).
ckanext.comments.approved_edits = false
# Author can edit own draft comments
# (optional, default: false).
ckanext.comments.draft_edits_by_author = false
# Author can edit own approved comments
# (optional, default: false).
ckanext.comments.approved_edits_by_author = false
# Number of reply levels that are shown on mobile layout
# (optional, default: 3).
ckanext.comments.mobile_depth_threshold = 3
Tests
To run the tests, do:
pytest --ckan-ini=test.ini
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ckanext-comments-0.0.20.tar.gz
(34.8 kB
view hashes)
Built Distribution
Close
Hashes for ckanext_comments-0.0.20-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b755cc7e1176fa8a0846fea553f934a8643850e4332a0e1d972c7a75333cd24a |
|
MD5 | 7d1c2b8ac3ea723d1cc088b08c879b5a |
|
BLAKE2b-256 | 2bad317289aaa550b6eeed42a2a83fafe547be3aaf64ceffce22f3cc9d642f32 |