Skip to main content

Reusable application for Django allowing users to flag/bookmark site objects

Project description

LBC Python 2


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/
from siteflags.models import ModelWithFlag

class Article(ModelWithFlag):

    ...  # Some model fields here.

And like so:

# myapp/
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


Quite simple. Quite generic. Read the documentation.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for django-siteflags, version 1.2.0
Filename, size File type Python version Upload date Hashes
Filename, size django_siteflags-1.2.0-py2.py3-none-any.whl (12.7 kB) File type Wheel Python version 2.7 Upload date Hashes View
Filename, size django-siteflags-1.2.0.tar.gz (17.0 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page