summaryrefslogtreecommitdiffstats
path: root/forum/badges/__init__.py
blob: 8d7cd097e4a80f6582be847adb095da2a1457112 (plain)
1
2
3
4
5
6
7
8
9
10
import re

from forum.badges.base import BadgeImplementation
from forum.modules import get_modules_script_classes

ALL_BADGES = dict([
            (re.sub('BadgeImpl', '', name).lower(), cls) for name, cls
            in get_modules_script_classes('badges', BadgeImplementation).items()
            if not re.search('AbstractBadgeImpl$', name)
        ])