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.11.tar.gz
(35.3 kB
view details)
Built Distribution
File details
Details for the file ckanext-comments-0.0.11.tar.gz
.
File metadata
- Download URL: ckanext-comments-0.0.11.tar.gz
- Upload date:
- Size: 35.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4ab2c3f9b0cb818aaaf6e2f0c9813a30f4417881e1fed403d46e73c91e5ff206 |
|
MD5 | d01eeea26a65deedbdb6ef064633c668 |
|
BLAKE2b-256 | 8fb1ad98b2b7840b47f80a9018957a42cf7df66969258374bd46523f6f8c25c0 |
Provenance
File details
Details for the file ckanext_comments-0.0.11-py3-none-any.whl
.
File metadata
- Download URL: ckanext_comments-0.0.11-py3-none-any.whl
- Upload date:
- Size: 43.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c2eb5808da1c95fac9c217e719926fb8d0eef33c372ba400f9f3f8c1a1f2bd0d |
|
MD5 | 6007bef9209bca263df42aa5ae85f85a |
|
BLAKE2b-256 | 4c1eb8363c565e4f57c34b1103c277b9d1c0087aa43ccbe09cfce9f571b7f26f |