summaryrefslogtreecommitdiff
path: root/testapp/exam/registry.py
diff options
context:
space:
mode:
authorankitjavalkar2015-04-21 18:15:10 +0530
committerankitjavalkar2015-04-26 19:46:01 +0530
commit0580f99fecc0bb495beb5706e18246834174710b (patch)
treed3c427f14f44d3018fe1592f276c27e16fe77fb2 /testapp/exam/registry.py
parent3ffdba6e587422a0f2955879d12e0b2aeac342e1 (diff)
downloadonline_test-0580f99fecc0bb495beb5706e18246834174710b.tar.gz
online_test-0580f99fecc0bb495beb5706e18246834174710b.tar.bz2
online_test-0580f99fecc0bb495beb5706e18246834174710b.zip
Add code checker registration class
Diffstat (limited to 'testapp/exam/registry.py')
-rw-r--r--testapp/exam/registry.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/testapp/exam/registry.py b/testapp/exam/registry.py
new file mode 100644
index 0000000..ef995ac
--- /dev/null
+++ b/testapp/exam/registry.py
@@ -0,0 +1,14 @@
+#!/usr/bin/env python
+
+class Registry(object):
+ def __init__(self):
+ self._registry = {}
+
+ def get_class(self, language):
+ return self._registry[language]
+
+ def register(self, language, cls):
+ self._registry[language] = cls
+
+
+registry = Registry() \ No newline at end of file