django-siteflags
https://github.com/idlesign/django-siteflags
Description
Reusable application for Django allowing users to flag/bookmark site objects
So you want a user to be able to put some flags on certain site entities.
Let’s say you need a kind of bookmark powered service, or a site where content is flagged and moderated, or a simplified rating system, or something similar.
Inherit you model from siteflags.models.ModelWithFlag and you’re almost done.
Like that:
# myapp/models.py
from siteflags.models import ModelWithFlag
class Article(ModelWithFlag):
... # Some model fields here.
And like so:
# myapp/views.py
from django.shortcuts import get_object_or_404
from .models import Article
def article_details(request, article_id):
article = get_object_or_404(Article, pk=article_id)
user = request.user
article.set_flag(user)
article.is_flagged(user)
article.remove_flag(user)
...
Quite simple. Quite generic. Read the documentation.
Documentation
Metadata
Release files for django-siteflags 1.3.0
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 | |
|---|---|---|---|---|
| django-siteflags-1.3.0.tar.gz | 17.5 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| django_siteflags-1.3.0-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details |
Total release size: 30.5 kB
Release files / django-siteflags-1.3.0.tar.gz
| Download URL | django-siteflags-1.3.0.tar.gz |
|---|---|
| Size | 17.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8ee5fe945daea5a8f6748c4473c435449117da2c3971bae11c243fe6c9119480
|
|
BLAKE2b-256 checksum How to use checksums |
4c16488c448fe219464a4269d6d4d8c06efc03ce15af8764321365fedead9606
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
Python-urllib/2.7
|
Release files / django_siteflags-1.3.0-py2.py3-none-any.whl
| Download URL | django_siteflags-1.3.0-py2.py3-none-any.whl |
|---|---|
| Size | 13.0 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
fb18b6fe9981a3d802c78316e6b582abbccdd0bce241887615fb5ab255c6ec4a
|
|
BLAKE2b-256 checksum How to use checksums |
aa7b59914e83d26e713a51950b7a3d90f682745161c4c338898a58615ccec495
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
Python-urllib/2.7
|
Security for django-siteflags 1.3.0
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.