Skip to main content

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

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.18.tar.gz (35.0 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.18-py3-none-any.whl (44.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ckanext-comments-0.0.18.tar.gz
  • Upload date:
  • Size: 35.0 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

Hashes for ckanext-comments-0.0.18.tar.gz
Algorithm Hash digest
SHA256 145fcd8f65ce63f9197d772592e64a8495a685626d538af6dd58b62498754c5f
MD5 3da9e53e007ea4c1b2301763453e677c
BLAKE2b-256 62413cee16c8edddb26ccf21c82860ffe219e0660b320784a1914ace16ab90af

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ckanext_comments-0.0.18-py3-none-any.whl
  • Upload date:
  • Size: 44.8 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

Hashes for ckanext_comments-0.0.18-py3-none-any.whl
Algorithm Hash digest
SHA256 5981e10a2b9faf178367d888a574e380da13e446834d6dce26da9367628149af
MD5 4b854b1239dad2eb8c413d75e56327f5
BLAKE2b-256 1d1d3d5ba7d4482e43e2edd2641e9e991dd11e0f43fd3ef13feed2b79a7572d4

See more details on using hashes here.

Release history Release notifications | RSS feed

0.3.1.post1

2 files

0.3.1

2 files

0.3.0

2 files

0.2.0

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

0.0.22

2 files

0.0.21

2 files

0.0.20

2 files

0.0.19

2 files

This release

0.0.18 This release

2 files

0.0.17

2 files

0.0.16

2 files

0.0.15

2 files

0.0.14

2 files

0.0.13

2 files

0.0.12

2 files

0.0.11

2 files

0.0.10

2 files

0.0.9

2 files

0.0.8

2 files

0.0.7

2 files

0.0.6

2 files

0.0.5

2 files

0.0.4

2 files

0.0.3

2 files

0.0.2

2 files

0.0.1

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page