collective.badge
Introduction
This package adds a content type for representing badges that can be assigned to users.
Each badge has an image and a roster (provided using collective.workspace) which includes:
User
Date Assigned
Assigned By
Expiration
The package is developed and tested on Plone 5.
An example of its use is on Plone.org, e.g. https://plone.org/profile/davisagli
Installation
Add collective.badge to your buildout eggs.
Activate collective.badge in the ‘Add-ons’ section of Plone’s Site Setup.
API
Assign a badge to a user:
>>> badge.assign_to_user(user_id='admin')
Check if a badge is active for a user (includes checking that the badge has not expired):
>>> badge.is_assigned_to_user(user_id='admin') True
List user ids of all active users for a badge:
>>> badge.list_active_users() ['admin']
Remove a badge from a user:
>>> badge.remove_from_user(user_id='admin')
Get a user’s active badges (sorted alphabetically):
>>> from collective.badge.api import badges_for_user >>> badges_for_user(user_id='admin') [<Badge at /Plone/badges/awesome-badge>]
Contributors
David Glick - Original Author
Changelog
1.0.1 (2017-03-04)
add PyPi classifiers for Plone 5.0, 5.1 [tkimnguyen]
1.0 (2017-03-04)
Initial release
Metadata
Release files for collective.badge 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| collective.badge-1.0.1.tar.gz | 19.3 kB | Without provenance | Details for collective.badge-1.0.1.tar.gz |
Release files / collective.badge-1.0.1.tar.gz
| Download URL | collective.badge-1.0.1.tar.gz |
|---|---|
| Size | 19.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
09dec1dc41914dc84710ae8db0eddca370912833e5209bdb4408e002bf9c2e1c
|
|
BLAKE2b-256 checksum How to use checksums |
0d4d0e5532018bba71b46e390de4601250157fda3bb4ca55a867cc7105696909
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for collective.badge 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.