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

Uploaded Source

Built Distribution

ckanext_comments-0.0.12-py3-none-any.whl (44.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ckanext-comments-0.0.12.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

Hashes for ckanext-comments-0.0.12.tar.gz
Algorithm Hash digest
SHA256 70cb7d994559929fa9e0aac95b28e431e0d3484598297727a1d0c4564a6c11ed
MD5 45f5e1101b57c581caa61acddc0b3eeb
BLAKE2b-256 0838a10564b57544caf5d0e86f56704342b61ef86eb8d9c83f78a3a3fb9c9c3b

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: ckanext_comments-0.0.12-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

Hashes for ckanext_comments-0.0.12-py3-none-any.whl
Algorithm Hash digest
SHA256 aea4c22019cba7c9bbbc834332748509b09d55ea79ec5c5af162bd12545d9443
MD5 6196632eaea871292910ced501afe703
BLAKE2b-256 8e4f94560f9e20609db0421fa2f1c7b86f60f5584385d5cde201b6d49d589035

See more details on using hashes here.

Provenance

Supported by

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