summaryrefslogtreecommitdiff
path: root/yaksh/forms.py
diff options
context:
space:
mode:
Diffstat (limited to 'yaksh/forms.py')
-rw-r--r--yaksh/forms.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/yaksh/forms.py b/yaksh/forms.py
index 797f54e..eedd809 100644
--- a/yaksh/forms.py
+++ b/yaksh/forms.py
@@ -650,6 +650,7 @@ class CommentForm(forms.ModelForm):
class TopicForm(forms.ModelForm):
timer = forms.CharField()
+
def __init__(self, *args, **kwargs):
super(TopicForm, self).__init__(*args, **kwargs)
self.fields['name'].widget.attrs.update(
@@ -666,8 +667,6 @@ class TopicForm(forms.ModelForm):
class VideoQuizForm(forms.ModelForm):
- _types = dict(question_types)
-
type = forms.CharField()
timer = forms.CharField()
@@ -693,7 +692,7 @@ class VideoQuizForm(forms.ModelForm):
self.fields['type'].widget.attrs.update(
{'class': form_input_class, 'readonly': True}
)
- self.fields['type'].initial = self._types.get(question_type)
+ self.fields['type'].initial = question_type
self.fields['description'].widget.attrs.update(
{'class': form_input_class, 'placeholder': 'Description'}
)