.
This commit is contained in:
@@ -191,3 +191,8 @@ class BodyPartForm(ModelForm):
|
||||
class Meta:
|
||||
model = BodyPart
|
||||
fields = ["bodypart"]
|
||||
|
||||
class ExamForm(ModelForm):
|
||||
class Meta:
|
||||
model = Exam
|
||||
fields = ["name", "time_limit", "exam_mode"]
|
||||
+1
-1
@@ -32,6 +32,7 @@ from .forms import (
|
||||
MarkAnatomyQuestionForm,
|
||||
AnatomyQuestionForm,
|
||||
StructureForm,
|
||||
ExamForm
|
||||
)
|
||||
from .models import (
|
||||
AnatomyQuestion,
|
||||
@@ -46,7 +47,6 @@ from .models import (
|
||||
)
|
||||
from generic.models import Examination
|
||||
from generic.views import ExamViews
|
||||
from generic.forms import ExamForm
|
||||
|
||||
from .tables import AnatomyQuestionTable, AnatomyUserAnswerTable
|
||||
from .filters import AnatomyQuestionFilter, AnatomyUserAnswerFilter
|
||||
|
||||
+2
-7
@@ -9,7 +9,7 @@ from django.forms import (
|
||||
from django.forms import inlineformset_factory
|
||||
|
||||
from generic.models import (
|
||||
Examination, Exam
|
||||
Examination
|
||||
)
|
||||
|
||||
from django.contrib.admin.widgets import FilteredSelectMultiple
|
||||
@@ -19,9 +19,4 @@ from django.forms.widgets import RadioSelect, TextInput, Textarea
|
||||
class ExaminationForm(ModelForm):
|
||||
class Meta:
|
||||
model = Examination
|
||||
fields = ["examination"]
|
||||
|
||||
class ExamForm(ModelForm):
|
||||
class Meta:
|
||||
model = Exam
|
||||
fields = ["name", "time_limit", "exam_mode"]
|
||||
fields = ["examination"]
|
||||
+1
-1
@@ -209,7 +209,7 @@ AnswerUpdateFormSet = inlineformset_factory(
|
||||
)
|
||||
|
||||
|
||||
# This should be made generic
|
||||
# This should be made generic?
|
||||
class ExamForm(ModelForm):
|
||||
class Meta:
|
||||
model = Exam
|
||||
|
||||
Reference in New Issue
Block a user