diff options
author | ankitjavalkar | 2015-02-20 18:04:36 +0530 |
---|---|---|
committer | ankitjavalkar | 2015-04-26 19:39:48 +0530 |
commit | 8e2469e937fd4f80ebf2053d6e21c9b670d38ea2 (patch) | |
tree | a2bbecb2f38247faa47440725bf1371c2448682c /testapp/exam/models.py | |
parent | 591c261ebbbaa0a052ed7b82428a3627ddaa7b1a (diff) | |
download | online_test-8e2469e937fd4f80ebf2053d6e21c9b670d38ea2.tar.gz online_test-8e2469e937fd4f80ebf2053d6e21c9b670d38ea2.tar.bz2 online_test-8e2469e937fd4f80ebf2053d6e21c9b670d38ea2.zip |
Modify form, views and templates to reflect changes made to TestCase model
Diffstat (limited to 'testapp/exam/models.py')
-rw-r--r-- | testapp/exam/models.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/testapp/exam/models.py b/testapp/exam/models.py index 4b8f737..ea79ad2 100644 --- a/testapp/exam/models.py +++ b/testapp/exam/models.py @@ -59,8 +59,8 @@ class Question(models.Model): # Number of points for the question. points = models.FloatField(default=1.0) - # Test cases for the question in the form of code that is run. - test = models.TextField(blank=True) + # # Test cases for the question in the form of code that is run. + # test = models.TextField(blank=True) # Any multiple choice options. Place one option per line. options = models.TextField(blank=True) @@ -429,19 +429,19 @@ class AssignmentUpload(models.Model): ################################################################################ class TestCase(models.Model): - question = models.ForeignKey(Question) + question = models.ForeignKey(Question, blank=True, null = True) # Test case function name - func_name = models.CharField(max_length=200) + func_name = models.CharField(blank=True, null = True, max_length=200) # Test case Keyword arguments in dict form - kw_args = models.TextField(blank=True) + kw_args = models.TextField(blank=True, null = True) # Test case Positional arguments in list form - pos_args = models.TextField(blank=True) + pos_args = models.TextField(blank=True, null = True) # Test case Expected answer in list form - expected_answer = models.TextField(blank=True) + expected_answer = models.TextField(blank=True, null = True) # Test case path to system test code applicable for CPP, C, Java and Scilab - ref_code_path = models.TextField(blank=True) + ref_code_path = models.TextField(blank=True, null = True) |