Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Django: Best Badge app for Django project

I would like to implement a badge app in a Django project to provide the same functionality like Stackoverflow to award users badges.

I have looked at various apps (list of apps), and various blogs have mentioned Brabeion. Is that the best Django app for Badges?

The project seems to be not maintained for some time and questions on github remained unanswered. The documentation is straight-forward, however details are not explained, e.g. what the method award_points is in the example below.

def my_view(request):
    if request.method == "POST":
        # do some things
        request.user.profile.award_points(15)
        badges.possibly_award_badge("points_awarded", user=request.user)
    # more view

On the other hand, djangopackages.com lists Django-achievements. The documentation seems good and detailed, however, each achievement needs its own class (could a long class definition file).

What are you using for your projects? If you use one of the described packages, is there a chance you could share some code around the point registration?

like image 481
neurix Avatar asked May 14 '12 11:05

neurix


2 Answers

I don't have an answer, but I'm researching the same question. I've repeatedly come across brabeion and django-badges, of the two django-badges seems the best to me.

None of the options seem extremely production proven though, I'd also like to know if anyone has used any of these, and what their experiences/suggestions are.

The reward points could be as simple as:

request.user.get_profile().award_points(15)

def award_points(points):
   self.points += points
like image 173
Murph Avatar answered Oct 14 '22 05:10

Murph


Django-badger is another solution that still seems to be in active development.

https://github.com/mozilla/django-badger

like image 23
John D. Avatar answered Oct 14 '22 05:10

John D.