diff options
author | prathamesh | 2014-06-26 17:08:24 +0530 |
---|---|---|
committer | prathamesh | 2014-06-26 17:08:24 +0530 |
commit | f50f2a37a0908a05a4da1d03f9e3c776d32df74c (patch) | |
tree | 55566c1b20a5c127091140fdae3d88c50e4ebe07 /testapp/exam/forms.py | |
parent | bd70b4d7f748eb3f56ac4b8366e02d113c1be3b9 (diff) | |
download | online_test-f50f2a37a0908a05a4da1d03f9e3c776d32df74c.tar.gz online_test-f50f2a37a0908a05a4da1d03f9e3c776d32df74c.tar.bz2 online_test-f50f2a37a0908a05a4da1d03f9e3c776d32df74c.zip |
changes as per suggestion
Diffstat (limited to 'testapp/exam/forms.py')
-rw-r--r-- | testapp/exam/forms.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/testapp/exam/forms.py b/testapp/exam/forms.py index a8e3ae7..a43ba2c 100644 --- a/testapp/exam/forms.py +++ b/testapp/exam/forms.py @@ -128,12 +128,11 @@ class QuizForm(forms.Form): def __init__(self, *args, **kwargs): super(QuizForm, self).__init__(*args, **kwargs) - self.QUIZZES = [('', 'Select a prerequisite quiz')] - self.QUIZZES = self.QUIZZES + \ + QUIZZES = [('', 'Select a prerequisite quiz')] + QUIZZES = QUIZZES + \ list(Quiz.objects.values_list('id','description')) self.fields['prerequisite'] = forms.CharField(required=False, - widget=forms.Select(choices=self.QUIZZES)) - + widget=forms.Select(choices=QUIZZES)) start_date = forms.DateField(initial=datetime.date.today) duration = forms.IntegerField(help_text='Will be taken in minutes') @@ -144,7 +143,6 @@ class QuizForm(forms.Form): help_text='Will be taken as percentage') language = forms.CharField(widget=forms.Select(choices=LANGUAGES)) - def save(self): start_date = self.cleaned_data["start_date"] duration = self.cleaned_data["duration"] |