.
This commit is contained in:
+7
-7
@@ -14,7 +14,7 @@ from .models import (
|
||||
AnatomyQuestion,
|
||||
#Examination,
|
||||
BodyPart,
|
||||
Structure,
|
||||
Structure2,
|
||||
Region,
|
||||
Modality,
|
||||
QuestionType,
|
||||
@@ -86,7 +86,7 @@ class AnatomyQuestionForm(ModelForm):
|
||||
queryset=Modality.objects.all(),
|
||||
)
|
||||
|
||||
#self.fields["structure"] = ModelChoiceField(
|
||||
#self.fields["Structure2"] = ModelChoiceField(
|
||||
# required=False,
|
||||
# queryset=Structure.objects.all(),
|
||||
#)
|
||||
@@ -148,7 +148,7 @@ class AnatomyQuestionForm(ModelForm):
|
||||
"image",
|
||||
"region",
|
||||
"modality",
|
||||
"structure",
|
||||
"Structure2",
|
||||
"examination",
|
||||
"body_part",
|
||||
"description",
|
||||
@@ -156,7 +156,7 @@ class AnatomyQuestionForm(ModelForm):
|
||||
]
|
||||
|
||||
widgets = {
|
||||
"structure" : autocomplete.ModelSelect2(url='anatomy:structure-autocomplete')
|
||||
"Structure2" : autocomplete.ModelSelect2(url='anatomy:Structure2-autocomplete')
|
||||
}
|
||||
|
||||
|
||||
@@ -197,10 +197,10 @@ class ExaminationForm(ModelForm):
|
||||
fields = ["examination"]
|
||||
|
||||
|
||||
class StructureForm(ModelForm):
|
||||
class Structure2Form(ModelForm):
|
||||
class Meta:
|
||||
model = Structure
|
||||
fields = ["structure"]
|
||||
model = Structure2
|
||||
fields = ["Structure2"]
|
||||
|
||||
|
||||
class BodyPartForm(ModelForm):
|
||||
|
||||
Reference in New Issue
Block a user