diff options
Diffstat (limited to 'forum/badges')
-rwxr-xr-x | forum/badges/__init__.py | 10 | ||||
-rwxr-xr-x | forum/badges/base.py | 11 |
2 files changed, 21 insertions, 0 deletions
diff --git a/forum/badges/__init__.py b/forum/badges/__init__.py new file mode 100755 index 00000000..8d7cd097 --- /dev/null +++ b/forum/badges/__init__.py @@ -0,0 +1,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) + ])
\ No newline at end of file diff --git a/forum/badges/base.py b/forum/badges/base.py new file mode 100755 index 00000000..03ef3565 --- /dev/null +++ b/forum/badges/base.py @@ -0,0 +1,11 @@ + + +class BadgeImplementation(object): + name = "" + description = "" + + def install(self): + pass + + def process_job(self): + raise NotImplementedError
\ No newline at end of file |