diff options
author | prathamesh | 2014-06-20 04:21:04 +0530 |
---|---|---|
committer | prathamesh | 2014-06-20 04:21:04 +0530 |
commit | 11307537a5ceae54722116cf699016e1e887edf6 (patch) | |
tree | a7ce8b695348f4b3a18695863ff2937b282f1e75 /testapp/exam/forms.py | |
parent | 763f96559bd1827ce87a72708d72efc9361ef588 (diff) | |
download | online_test-11307537a5ceae54722116cf699016e1e887edf6.tar.gz online_test-11307537a5ceae54722116cf699016e1e887edf6.tar.bz2 online_test-11307537a5ceae54722116cf699016e1e887edf6.zip |
Changes made as per the suggestions.
Diffstat (limited to 'testapp/exam/forms.py')
-rw-r--r-- | testapp/exam/forms.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/testapp/exam/forms.py b/testapp/exam/forms.py index e82ce3a..7c66944 100644 --- a/testapp/exam/forms.py +++ b/testapp/exam/forms.py @@ -12,18 +12,17 @@ from taggit_autocomplete_modified import settings from string import letters, punctuation, digits import datetime -QUESTION_LANGUAGE_CHOICES = ( +LANGUAGES = ( ("select", "Select"), ("python", "Python"), ("bash", "Bash"), - ("mcq", "MCQ"), ("C", "C Language"), ("C++", "C++ Language"), ("java", "Java Language"), ("scilab", "Scilab"), ) -QUESTION_TYPE_CHOICES = ( +QUESTION_TYPES = ( ("select", "Select"), ("mcq", "Multiple Choice"), ("code", "Code"), @@ -162,9 +161,9 @@ class QuestionForm(forms.Form): options = forms.CharField(widget=forms.Textarea\ (attrs={'cols': 40, 'rows': 1}), required=False) language = forms.CharField(max_length=20, widget=forms.Select\ - (choices=QUESTION_LANGUAGE_CHOICES)) + (choices=LANGUAGES)) type = forms.CharField(max_length=8, widget=forms.Select\ - (choices=QUESTION_TYPE_CHOICES)) + (choices=QUESTION_TYPES)) active = forms.BooleanField(required=False) tags = TagField(widget=TagAutocomplete(), required=False) snippet = forms.CharField(widget=forms.Textarea\ |