diff options
author | adityacp | 2016-06-20 14:50:58 +0530 |
---|---|---|
committer | adityacp | 2016-07-28 15:56:06 +0530 |
commit | d27b168e6fa0789891acf8952a60a7c200caef44 (patch) | |
tree | b99332a7937a14789e5a3e4ba556e840898bf51f /yaksh/forms.py | |
parent | 542f862445b65f56704009e324ed39a7eec23dad (diff) | |
download | online_test-d27b168e6fa0789891acf8952a60a7c200caef44.tar.gz online_test-d27b168e6fa0789891acf8952a60a7c200caef44.tar.bz2 online_test-d27b168e6fa0789891acf8952a60a7c200caef44.zip |
added files upload for questions
Diffstat (limited to 'yaksh/forms.py')
-rw-r--r-- | yaksh/forms.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/yaksh/forms.py b/yaksh/forms.py index a443e34..1226fe2 100644 --- a/yaksh/forms.py +++ b/yaksh/forms.py @@ -175,6 +175,11 @@ class QuestionForm(forms.ModelForm): exclude = ['user'] +class FileForm(forms.Form): + file_field = forms.FileField(widget=forms.ClearableFileInput(attrs={'multiple': True}), + required=False) + + class RandomQuestionForm(forms.Form): question_type = forms.CharField(max_length=8, widget=forms.Select\ (choices=question_types)) @@ -211,7 +216,7 @@ class ProfileForm(forms.ModelForm): class Meta: model = Profile fields = ['first_name', 'last_name', 'institute', - 'department', 'roll_number', 'position', 'timezone'] + 'department', 'roll_number', 'position', 'timezone'] first_name = forms.CharField(max_length=30) last_name = forms.CharField(max_length=30) |