Skip to main content

No project description provided

Project description

Tests

ckanext-comments

Add comment-trees to CKAN pages

Requirements

  • python >= 3.7
  • CKAN >= 2.9

Installation

To install ckanext-comments:

  1. Install python package

     pip install ckanext-comments
    
  2. Add comments to the ckan.plugins setting in your CKAN config file

  3. Apply database migrations

     ckan db upgrade -p comments
    
  4. Add cooments/snippets/thread.html to your package/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

AGPL

Project details


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.21.tar.gz (33.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ckanext_comments-0.0.21-py3-none-any.whl (43.4 kB view details)

Uploaded Python 3

File details

Details for the file ckanext-comments-0.0.21.tar.gz.

File metadata

  • Download URL: ckanext-comments-0.0.21.tar.gz
  • Upload date:
  • Size: 33.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.8.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.10

File hashes

Hashes for ckanext-comments-0.0.21.tar.gz
Algorithm Hash digest
SHA256 e753f088875c96f4c2490113226c80958b6e80b1ace1ee8fcd59c3d9d28c0c0f
MD5 1186cec30e9950faf8a24ab5618b6004
BLAKE2b-256 0c7162dc3a819c46d44a7756568628bcc49ab0fb6630bcdaeeaa0a2fecab9956

See more details on using hashes here.

File details

Details for the file ckanext_comments-0.0.21-py3-none-any.whl.

File metadata

  • Download URL: ckanext_comments-0.0.21-py3-none-any.whl
  • Upload date:
  • Size: 43.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.8.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.10

File hashes

Hashes for ckanext_comments-0.0.21-py3-none-any.whl
Algorithm Hash digest
SHA256 3d75c27405d809afec2dfb7ddaf994fffe48447346e2ff66ac64dce72b8fa0dd
MD5 bce79a5f2c88adfc72f2ec4bf7bd26a1
BLAKE2b-256 4b5ebeeeee0a4494b146eb06d6da02ed86395cec1c26523346f8e4e8f65b2cd8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page