mozilla/kuma — pull request #1906 by lmorchard (2014-01-23 18:40:23+00:00)
Title: bug 960835: add django-badger to kuma

This depends on a PR to kuma-ilb: https://github.com/mozilla/kuma-lib/pull/32

This also needs **BOTH** a waffle flag *and* switch named "badger" to be enabled. The flag gates some key views, while the switch enables model-based badge awards (e.g. a wiki document change is saved)

You'll also need to run these commands to ensure the DB tables are updated & badges are created:
```
./manage.py syncdb
./manage.py migrate
./manage.py update_badges
```

This might be do-not-merge territory, because:

1. There are no badges yet, and this PR contains junk sample badges just to exercise things
2. The UX & CSS of all these views is totally horrible

But, if everything works, we can merge & keep it waffled while we iterate.

To spot check, there should be a [/en-US/badges/](https://developer-local.allizom.org/en-US/badges/) page listing all available badges, with links to detail pages.

Also, there are several activities that should result in badge awards:

* Visit the [/learn](https://developer-local.allizom.org/en-US/learn/) section
* Visit the [/demos/devderby](https://developer-local.allizom.org/en-US/demos/devderby) section
* Create a new wiki document
* Edit a wiki document for the first time
* Edit a wiki document 5 times

When you get a badge, you should see an overlay pop up on your next request to the site that notifies you of new badges after your recent activity. There should also be a new section on your profile listing recent badge awards. You should also be able to click around on badges to see detail pages & etc.