summaryrefslogtreecommitdiff
path: root/exam/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'exam/models.py')
-rw-r--r--exam/models.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/exam/models.py b/exam/models.py
index d433c7c..ef4312f 100644
--- a/exam/models.py
+++ b/exam/models.py
@@ -12,6 +12,11 @@ class Profile(models.Model):
position = models.CharField(max_length=64)
+LANGUAGE_CHOICES = (
+ ("python", "Python"),
+ ("bash", "Bash"),
+ )
+
################################################################################
class Question(models.Model):
"""A question in the database."""
@@ -29,6 +34,9 @@ class Question(models.Model):
# This is simple Python code.
test = models.TextField()
+ # The language being tested.
+ language = models.CharField(max_length=10, choices=LANGUAGE_CHOICES)
+
# Is this question active or not. If it is inactive it will not be used
# when creating a QuestionPaper.
active = models.BooleanField(default=True)