diff options
author | adityacp | 2020-04-08 15:55:59 +0530 |
---|---|---|
committer | adityacp | 2020-04-08 15:55:59 +0530 |
commit | ce3eb1dbbd924003489d01f4e98aba841cd803c0 (patch) | |
tree | 27bdd5eaee82c34094a70a9c5b35626a8d45315d /yaksh/forms.py | |
parent | 4802a89acef7567c6a8861daab60924fe862367f (diff) | |
download | online_test-ce3eb1dbbd924003489d01f4e98aba841cd803c0.tar.gz online_test-ce3eb1dbbd924003489d01f4e98aba841cd803c0.tar.bz2 online_test-ce3eb1dbbd924003489d01f4e98aba841cd803c0.zip |
Change templates, views, forms, models
- Allow to test, download and delete single question
- Fix pagination for searching and filtering questions
Diffstat (limited to 'yaksh/forms.py')
-rw-r--r-- | yaksh/forms.py | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/yaksh/forms.py b/yaksh/forms.py index 52ef75d..d2627d7 100644 --- a/yaksh/forms.py +++ b/yaksh/forms.py @@ -17,9 +17,9 @@ from string import punctuation, digits import pytz from .send_emails import generate_activation_key -languages = (("select", "Select Language"),) + languages +languages = (("", "Select Language"),) + languages -question_types = (("select", "Select Question Type"),) + question_types +question_types = (("", "Select Question Type"),) + question_types test_case_types = ( ("standardtestcase", "Standard Testcase"), @@ -357,11 +357,14 @@ class QuestionFilterForm(forms.Form): ) self.fields['marks'].required = False language = forms.CharField( - max_length=8, widget=forms.Select(choices=languages, - attrs={'class': 'custom-select'})) + max_length=8, widget=forms.Select( + choices=languages, attrs={'class': 'custom-select'}), + required=False + ) question_type = forms.CharField( - max_length=8, widget=forms.Select(choices=question_types, - attrs={'class': 'custom-select'}) + max_length=8, widget=forms.Select( + choices=question_types, attrs={'class': 'custom-select'}), + required=False ) |