djangobadge

Badge app made with django framework


Keywords
github, django, badge, badges, coogger, django-application
License
MIT
Install
pip install djangobadge==0.0.14

Documentation

Djangobadge

MIT License

Install

pip install djangobadge

Usage

/settings.py

INSTALLED_APPS += [
    "djangobadge",
]

Open admin panel and save some badge from Badge section

>>> from djangobadge.models import UserBadge, Badges
>>> from django.contrib.auth.models import User
>>> user = User.objects.first()
>>> badge = Badges.objects.get(title="a unique badge title")
# to add new badge any user
>>> UserBadge.objects.get(user=user).badge.add(badge)
# to remove new badge any user
>>> UserBadge.objects.get(user=user).badge.remove(badge)