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