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
commentsto theckan.pluginssetting in your CKAN config file -
Apply database migrations
ckan db upgrade -p comments -
Add
cooments/snippets/thread.htmlto yourpackage/read.htmltemplate, 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
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.14.tar.gz
(35.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ckanext-comments-0.0.14.tar.gz.
File metadata
- Download URL: ckanext-comments-0.0.14.tar.gz
- Upload date:
- Size: 35.5 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 |
2aff40e4a6450ef96b061b25b929bf8903dc72ae591782ac62cbe9b5e5203fac
|
|
| MD5 |
aaf45b7afdac57134e61dea21fa54161
|
|
| BLAKE2b-256 |
6e3a397cf73c1de291bb46fff426abc49162c745dff498917dc7a4d5f01c5aca
|
File details
Details for the file ckanext_comments-0.0.14-py3-none-any.whl.
File metadata
- Download URL: ckanext_comments-0.0.14-py3-none-any.whl
- Upload date:
- Size: 44.1 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 |
7bdc15584d3619a56ca87fbd71468a9d28dba224df388215397f8b3f251fb280
|
|
| MD5 |
29c1e5570aec30bd7c4f5858dcd8fdeb
|
|
| BLAKE2b-256 |
53feb2be9ac7e99112da458390cc59428a918aa7912e6b72d9168e74fbc2ac7d
|