Extension Comments


Extension Basics

Title
Comments
Name
ckanext-comments
Type
Public extension
Description
Comment threads for CKAN entities
CKAN versions

~2.11

Show details

These CKAN Versions are exactely matched:

Download-Url (zip)
Download-Url commit date
2024-06-01
Url to repo
Category
Content Management


Background Infos

Description (long)
Show details

Add threaded comment functionality to CKAN pages. Provides comment threads for datasets, resources, groups, organizations, and users with API-first design. Features include nested reply support with configurable depth, draft/approved comment workflow with optional approval requirement, editor and author permissions for editing (configurable for draft/approved), mobile layout with depth threshold, default dataset comments via snippet or configuration, custom subject type support with registered getters, tree-structured comment display, date filtering (comments since specific date), author information inclusion, and Jinja2 snippet integration for any page.

Version
0.3.1
Version release date
2024-06-01
Contact name
DataShades / Sergey Motornyuk
Contakt email
Contact Url
(not set)


Installation Guide

Configuration hints

Installation: pip install ckanext-comments, add ‘comments’ to ckan.plugins, run ‘ckan db upgrade -p comments’. Dependencies: blinker, typing-extensions. Python >=3.8, CKAN >=2.9. Configuration: ckanext.comments.require_approval (default: true) for comment moderation, ckanext.comments.draft_edits (default: true) allows editor to edit drafts, ckanext.comments.draft_edits_by_author (default: true) allows author to edit own drafts, ckanext.comments.approved_edits (default: false) for editor editing approved comments, ckanext.comments.approved_edits_by_author (default: false) for author editing own approved comments, ckanext.comments.mobile_depth_threshold (default: 3) for mobile reply levels, ckanext.comments.enable_default_dataset_comments (default: false) to auto-include on dataset pages, ckanext.comments.subject.{subject_type}_getter for custom subject types (e.g., ckanext.comments.subject.question_getter=path.to.getter). Snippet usage: {% snippet ‘comments/snippets/thread.html’, subject_id=pkg.id, subject_type=’package’ %}. API: comments_thread_create/show/delete, comments_comment_create/show/approve/delete/update. Thread options: init_missing, include_comments, include_author, combine_comments, after_date. Use cases: Dataset discussions, resource feedback, community engagement, moderated content, Q&A sections.

Plugins to configure (ckan.ini)
comments
CKAN Settings (ckan.ini)
# ckanext.comments.require_approval = false # ckanext.comments.draft_edits = true # ckanext.comments.draft_edits_by_author = false # ckanext.comments.approved_edits = false # ckanext.comments.approved_edits_by_author = false # ckanext.comments.mobile_depth_threshold = 3 # ckanext.comments.enable_default_dataset_comments = true # ckanext.comments.subject.question_getter = ckanext.msf_ask_question.model.question_getter
DB migration to be executed
comments
<< back to Extensions