Mercurial > public > sg101
comparison bio/badges.py @ 823:5892c05886a9
Band map WIP: add approve new band map entries in admin.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Wed, 24 Sep 2014 20:09:05 -0500 |
parents | 9e803323a0d0 |
children |
comparison
equal
deleted
inserted
replaced
822:2c4f28b1c12a | 823:5892c05886a9 |
---|---|
5 from bio.models import BadgeOwnership | 5 from bio.models import BadgeOwnership |
6 | 6 |
7 | 7 |
8 # Numeric ID's for badges that are awarded for user actions: | 8 # Numeric ID's for badges that are awarded for user actions: |
9 (CONTRIBUTOR_PIN, CALENDAR_PIN, NEWS_PIN, LINK_PIN, DOWNLOAD_PIN, | 9 (CONTRIBUTOR_PIN, CALENDAR_PIN, NEWS_PIN, LINK_PIN, DOWNLOAD_PIN, |
10 SECURITY_PIN, POTD_PIN) = range(7) | 10 SECURITY_PIN, POTD_PIN, MAP_PIN) = range(8) |
11 | 11 |
12 | 12 |
13 def award_badge(badge_id, user): | 13 def award_badge(badge_id, user): |
14 """This function awards the badge specified by badge_id | 14 """This function awards the badge specified by badge_id |
15 to the given user. If the user already has the badge, | 15 to the given user. If the user already has the badge, |