-class EnlightenedBadge(AcceptedAndVotedAnswerAbstractBadge):
- type = const.SILVER_BADGE
- description = _('First answer was accepted with at least %s up votes') % str(settings.ENLIGHTENED_UP_VOTES)
-
- def __init__(self):
- def handler(answer):
- self.award_badge(answer.author, answer, True)
-
- super(EnlightenedBadge, self).__init__(settings.ENLIGHTENED_UP_VOTES, handler)
-
-
-class GuruBadge(AcceptedAndVotedAnswerAbstractBadge):
- type = const.SILVER_BADGE
- description = _('Accepted answer and voted up %s times') % str(settings.GURU_UP_VOTES)
-
- def __init__(self):
- def handler(answer):
- self.award_badge(answer.author, answer)
-
- super(GuruBadge, self).__init__(settings.GURU_UP_VOTES, handler)
-
-
-class NecromancerBadge(CountableAbstractBadge):
- type = const.SILVER_BADGE
+class Necromancer(AbstractBadge):
+ type = Badge.SILVER
+ listen_to = (VoteUpAction,)
+ name = _("Necromancer")