summaryrefslogtreecommitdiffstats
path: root/forum/badges
diff options
context:
space:
mode:
Diffstat (limited to 'forum/badges')
-rwxr-xr-xforum/badges/__init__.py10
-rwxr-xr-xforum/badges/base.py11
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