summaryrefslogtreecommitdiff
path: root/yaksh/forms.py
diff options
context:
space:
mode:
authorKing2016-07-28 17:39:44 +0530
committerGitHub2016-07-28 17:39:44 +0530
commit2b03aeb36fa333ea1644a248c742cf0c1df12a5f (patch)
tree4c753ba9a1fbccf3e06d1ed1d998137c88a73b88 /yaksh/forms.py
parent344e1e804cee214c0d0f5c41ca16d871e786d4c3 (diff)
parent83bee9d89e163e98504c8aa210ce60200bd1cd1d (diff)
downloadonline_test-2b03aeb36fa333ea1644a248c742cf0c1df12a5f.tar.gz
online_test-2b03aeb36fa333ea1644a248c742cf0c1df12a5f.tar.bz2
online_test-2b03aeb36fa333ea1644a248c742cf0c1df12a5f.zip
Merge pull request #113 from adityacp/file_based_questions
File based questions
Diffstat (limited to 'yaksh/forms.py')
-rw-r--r--yaksh/forms.py7
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)