.
This commit is contained in:
+8
-3
@@ -8,6 +8,8 @@ from django.forms import (
|
||||
)
|
||||
from django.forms import inlineformset_factory
|
||||
|
||||
from generic.forms import ExamAuthorFormMixin, ExamFormMixin
|
||||
|
||||
from .models import (
|
||||
Question,
|
||||
CidUserAnswer,
|
||||
@@ -28,7 +30,10 @@ class CidUserAnswerForm(ModelForm):
|
||||
self.fields['answer'].required = False
|
||||
|
||||
# This should be made generic?
|
||||
class ExamForm(ModelForm):
|
||||
class Meta:
|
||||
class ExamForm(ExamFormMixin, ModelForm):
|
||||
class Meta(ExamFormMixin.Meta):
|
||||
model = Exam
|
||||
fields = ["name", "time_limit", "exam_mode", "active", "archive"]
|
||||
|
||||
class ExamAuthorForm(ExamAuthorFormMixin):
|
||||
class Meta(ExamAuthorFormMixin.Meta):
|
||||
model = Exam
|
||||
Reference in New Issue
Block a user