8

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?

JJJ
  • 32,902
  • 20
  • 89
  • 102
neurix
  • 4,126
  • 6
  • 46
  • 71

2 Answers2

6

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
Murph
  • 511
  • 7
  • 16
  • 3
    Just for future reference, we went with brabeion. I like the extensibility, celery support, and it's system of using defined event groups to check for rewards, vs a manual or single signal based approach. – Murph May 29 '12 at 18:12
  • I'm using brabeion also, but I think it doesn't work well with django-1.4 – danielrvt Aug 26 '12 at 19:12
  • I'm on 1.3 and had to customize it to get it to work. The basic concept is good though, I'm sure you could get it to work on 1.4 and make a pull request (though they still haven't accepted mine). Try using skeet70's branch of brabeion to see if it works for you (it's the only open pull request). – Murph Aug 28 '12 at 18:50
  • There's nothing to stop you from having brabeion go negative as far as I can tell. I'm not up to date on the current gamification ecosystem however, so there may be something better out now. – Murph Mar 19 '14 at 15:57
1

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

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

John D.
  • 548
  • 7
  • 19