diff options
author | ankitjavalkar | 2016-05-02 14:38:13 +0530 |
---|---|---|
committer | ankitjavalkar | 2016-05-09 11:51:06 +0530 |
commit | d953f6f9e62671eeb5d6ea6498475167301dfe91 (patch) | |
tree | ca172e52de5e8dd04e97ce7acfa16ab577ab9d58 /yaksh/models.py | |
parent | 23b7abd3c1125e4c875e214e4f673c48c4bf4752 (diff) | |
download | online_test-d953f6f9e62671eeb5d6ea6498475167301dfe91.tar.gz online_test-d953f6f9e62671eeb5d6ea6498475167301dfe91.tar.bz2 online_test-d953f6f9e62671eeb5d6ea6498475167301dfe91.zip |
- Fix tests
- Fix minor views.py
- Fix minor errors caused due to conflict resolution, rebasing
- Fix errors in forms, views
- Minor Button label change in addquestion.html
- Add snippet to question
- Remove commented code
Diffstat (limited to 'yaksh/models.py')
-rw-r--r-- | yaksh/models.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/yaksh/models.py b/yaksh/models.py index a200ae1..dd2fb5f 100644 --- a/yaksh/models.py +++ b/yaksh/models.py @@ -176,6 +176,9 @@ class Question(models.Model): # Tags for the Question. tags = TaggableManager(blank=True) + # Snippet of code provided to the user. + snippet = models.CharField(max_length=256, blank=True) + # user for particular question user = models.ForeignKey(User, related_name="user") @@ -199,10 +202,9 @@ class Question(models.Model): questions_dict = [] for question in questions: q_dict = {'summary': question.summary, 'description': question.description, - 'points': question.points, 'test': question.test, - 'ref_code_path': question.ref_code_path, - 'options': question.options, 'language': question.language, + 'points': question.points, 'language': question.language, 'type': question.type, 'active': question.active, + 'test_case_type': question.test_case_type, 'snippet': question.snippet} questions_dict.append(q_dict) |