- from forum.badges.base import BadgesMeta
- badge = BadgesMeta.by_id.get(int(pk), None)
- if not badge:
- return super(BadgesQuerySet, self).get(*args, **kwargs)
- return badge.ondb
-
-
-class BadgeManager(models.Manager):
- use_for_related_fields = True
-
- def get_query_set(self):
- return BadgesQuerySet(self.model)
-
-class Badge(models.Model):