summaryrefslogtreecommitdiff
path: root/yaksh/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'yaksh/models.py')
-rw-r--r--yaksh/models.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/yaksh/models.py b/yaksh/models.py
index b1a53f0..db4b7a8 100644
--- a/yaksh/models.py
+++ b/yaksh/models.py
@@ -50,6 +50,11 @@ test_status = (
def get_assignment_dir(instance, filename):
return '%s/%s' % (instance.user.roll_number, instance.assignmentQuestion.id)
+def get_model_class(model):
+ ctype = ContentType.objects.get(app_label="yaksh", model=model)
+ model_class = ctype.model_class()
+
+
###############################################################################
class Course(models.Model):