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.22.tar.gz
(33.4 kB
view details)
Built Distribution
File details
Details for the file ckanext-comments-0.0.22.tar.gz
.
File metadata
- Download URL: ckanext-comments-0.0.22.tar.gz
- Upload date:
- Size: 33.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.11.3 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fdc08b8d2eac7d8542ef6435fb88637494f24b814c3eae38f5ba0af49576e05c |
|
MD5 | 7760c1917e1d9b48ea7ecdcfa17e6642 |
|
BLAKE2b-256 | 6cf1a58c0f9d80a273a0d7b532b47ef79a467f80ce6594f8bfc1b7cca4348467 |
Provenance
File details
Details for the file ckanext_comments-0.0.22-py3-none-any.whl
.
File metadata
- Download URL: ckanext_comments-0.0.22-py3-none-any.whl
- Upload date:
- Size: 43.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.11.3 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ef8d3dea47b6a9e7044b5a6dbaffd2ca61fb16e64e6be983c79b2697113698c3 |
|
MD5 | 8b8c9f58e749f9c9aebd0585d7ec7e9c |
|
BLAKE2b-256 | 3f00682917ad6deac8bff52d2a699786a2e8ca4b6c5a85a6c779629f61978386 |