Name | ckanext-likes JSON |
Version |
0.0.1
JSON |
| download |
home_page | None |
Summary | None |
upload_time | 2025-08-01 16:30:31 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.1 |
license | MIT |
keywords |
ckan
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
[](https://github.com/DataShades/ckanext-likes/actions/workflows/test.yml)
# ckanext-likes
A CKAN extension that enables users to like any object with a unique ID,
promoting engagement across datasets, resources, organizations, and more.
## Overview
This CKAN extension introduces a flexible and reusable "like" functionality
that can be attached to any CKAN object with a unique identifier. Whether it's
datasets, resources, organizations, groups, or custom entities introduced by
other extensions, this plugin allows users to express appreciation or endorse
content directly within the CKAN interface.
Key features include:
* Universal Compatibility: Works with any CKAN object that has a unique ID,
including datasets, resources, organizations, users, or even custom content
types.
* ful API Support: Exposes endpoints to like/unlike objects and retrieve like
counts, enabling integration with third-party systems or frontend
customizations.
* Customizable UI Widgets: Provides simple templates and frontend snippets that
can be embedded anywhere in CKAN themes to display like buttons and counters.
* User Tracking & Anti-Spam: Ties likes to user accounts to prevent duplicate
voting and support analytics.
This extension can be a powerful tool to highlight popular datasets, promote
community curation, and enhance overall user interaction on your CKAN portal.
## Installation
Compatibility with core CKAN versions:
| CKAN version | Compatible? |
|--------------|-------------|
| <= 2.10 | No |
| >= 2.11 | Yes |
Install the extension from [PyPI](https://pypi.org/project/ckanext-likes):
```sh
pip install ckanext-likes
```
Add `likes` to the list of CKAN plugins and apply database migrations:
```sh
ckan db upgrade -p likes
```
## Usage
Add like-widget on any page and it will automatically initialize and update
likes for the specified object:
```jinja
{%
snippet "likes/snippets/widget.html",
object_id=OBJECT_ID, object_type=OBJECT_TYPE, inline=true
%}
```
`inline` flag renders widget with 0 likes. When the widget appears in the
viewport for the first time, it updates the value via AJAX request and listens
for the user clicks, handling like/un-like events and re-rendering icon and
counter.
If you want to update counters as soon as page loads, add
`inline_trigger="load"` argument to the snippet call. This is not recommended
if you have a lot of widgets on the page, such as like-buttons agains every
comment in the comments thread.
```jinja
{%
snippet "likes/snippets/widget.html",
object_id=OBJECT_ID, object_type=OBJECT_TYPE, inline=true, inline_trigger="load"
%}
```
If you already know the number of likes for the object and whether current
visitor has already liked the object, specify these parameters as `count` and
`liked` arguments for the snippet, instead of the `inline=true`. In this case,
widget won't perform additional requests to the backend during initialization:
```jinja
{%
snippet "likes/snippets/widget.html",
object_id=OBJECT_ID, object_type=OBJECT_TYPE, count=100, liked=true
%}
```
Raw data
{
"_id": null,
"home_page": null,
"name": "ckanext-likes",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.1",
"maintainer_email": "DataShades <datashades@linkdigital.com.au>",
"keywords": "CKAN",
"author": null,
"author_email": "DataShades <datashades@linkdigital.com.au>, Sergey Motornyuk <sergey.motornyuk@linkdigital.com.au>",
"download_url": "https://files.pythonhosted.org/packages/47/9d/42f64f2955c2d182cc832dd8d29b66d35bb03b2ee8b609903c9945064aee/ckanext_likes-0.0.1.tar.gz",
"platform": null,
"description": "[](https://github.com/DataShades/ckanext-likes/actions/workflows/test.yml)\n\n# ckanext-likes\n\nA CKAN extension that enables users to like any object with a unique ID,\npromoting engagement across datasets, resources, organizations, and more.\n\n## Overview\n\nThis CKAN extension introduces a flexible and reusable \"like\" functionality\nthat can be attached to any CKAN object with a unique identifier. Whether it's\ndatasets, resources, organizations, groups, or custom entities introduced by\nother extensions, this plugin allows users to express appreciation or endorse\ncontent directly within the CKAN interface.\n\nKey features include:\n\n* Universal Compatibility: Works with any CKAN object that has a unique ID,\n including datasets, resources, organizations, users, or even custom content\n types.\n\n* ful API Support: Exposes endpoints to like/unlike objects and retrieve like\n counts, enabling integration with third-party systems or frontend\n customizations.\n\n* Customizable UI Widgets: Provides simple templates and frontend snippets that\n can be embedded anywhere in CKAN themes to display like buttons and counters.\n\n* User Tracking & Anti-Spam: Ties likes to user accounts to prevent duplicate\n voting and support analytics.\n\n\nThis extension can be a powerful tool to highlight popular datasets, promote\ncommunity curation, and enhance overall user interaction on your CKAN portal.\n\n## Installation\n\nCompatibility with core CKAN versions:\n\n| CKAN version | Compatible? |\n|--------------|-------------|\n| <= 2.10 | No |\n| >= 2.11 | Yes |\n\n\nInstall the extension from [PyPI](https://pypi.org/project/ckanext-likes):\n\n```sh\npip install ckanext-likes\n```\n\nAdd `likes` to the list of CKAN plugins and apply database migrations:\n\n```sh\nckan db upgrade -p likes\n```\n\n\n## Usage\n\nAdd like-widget on any page and it will automatically initialize and update\nlikes for the specified object:\n\n```jinja\n{%\n snippet \"likes/snippets/widget.html\",\n object_id=OBJECT_ID, object_type=OBJECT_TYPE, inline=true\n%}\n```\n\n`inline` flag renders widget with 0 likes. When the widget appears in the\nviewport for the first time, it updates the value via AJAX request and listens\nfor the user clicks, handling like/un-like events and re-rendering icon and\ncounter.\n\nIf you want to update counters as soon as page loads, add\n`inline_trigger=\"load\"` argument to the snippet call. This is not recommended\nif you have a lot of widgets on the page, such as like-buttons agains every\ncomment in the comments thread.\n\n```jinja\n{%\n snippet \"likes/snippets/widget.html\",\n object_id=OBJECT_ID, object_type=OBJECT_TYPE, inline=true, inline_trigger=\"load\"\n%}\n```\n\nIf you already know the number of likes for the object and whether current\nvisitor has already liked the object, specify these parameters as `count` and\n`liked` arguments for the snippet, instead of the `inline=true`. In this case,\nwidget won't perform additional requests to the backend during initialization:\n\n```jinja\n{%\n snippet \"likes/snippets/widget.html\",\n object_id=OBJECT_ID, object_type=OBJECT_TYPE, count=100, liked=true\n%}\n```\n",
"bugtrack_url": null,
"license": "MIT",
"summary": null,
"version": "0.0.1",
"project_urls": {
"Homepage": "https://github.com/DataShades/ckanext-likes"
},
"split_keywords": [
"ckan"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "7160f570a97da934459e299735015c0fb3480d53a375b5b2c2bafe16c1a91dfc",
"md5": "cbdeab8385b93674959e1cf981d907ad",
"sha256": "4bc190e5d5cb89bb01aa260af2f021495887daf3d4a5eb966fffcd61f27cb739"
},
"downloads": -1,
"filename": "ckanext_likes-0.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "cbdeab8385b93674959e1cf981d907ad",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.1",
"size": 17383,
"upload_time": "2025-08-01T16:30:29",
"upload_time_iso_8601": "2025-08-01T16:30:29.304206Z",
"url": "https://files.pythonhosted.org/packages/71/60/f570a97da934459e299735015c0fb3480d53a375b5b2c2bafe16c1a91dfc/ckanext_likes-0.0.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "479d42f64f2955c2d182cc832dd8d29b66d35bb03b2ee8b609903c9945064aee",
"md5": "4cbee166edc464beaccebbd1694a6046",
"sha256": "27fb98336692b98ac9de4496c78a821308b7ec188bd959dad7cb8b8da781fab4"
},
"downloads": -1,
"filename": "ckanext_likes-0.0.1.tar.gz",
"has_sig": false,
"md5_digest": "4cbee166edc464beaccebbd1694a6046",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.1",
"size": 15160,
"upload_time": "2025-08-01T16:30:31",
"upload_time_iso_8601": "2025-08-01T16:30:31.042953Z",
"url": "https://files.pythonhosted.org/packages/47/9d/42f64f2955c2d182cc832dd8d29b66d35bb03b2ee8b609903c9945064aee/ckanext_likes-0.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-01 16:30:31",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "DataShades",
"github_project": "ckanext-likes",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "ckanext-likes"
}