improve question adding
This commit is contained in:
@@ -116,3 +116,36 @@ AnswerFormSet = inlineformset_factory(
|
||||
max_num=10,
|
||||
field_classes="testing",
|
||||
)
|
||||
|
||||
AnswerUpdateFormSet = inlineformset_factory(
|
||||
AnatomyQuestion,
|
||||
Answer,
|
||||
fields=["answer", "status"],
|
||||
widgets={
|
||||
"answer": TextInput(
|
||||
attrs={"required": "true", "minlength": 2, "maxlength": 500}
|
||||
)
|
||||
},
|
||||
exclude=[],
|
||||
can_delete=True,
|
||||
extra=0,
|
||||
max_num=10,
|
||||
field_classes="testing",
|
||||
)
|
||||
|
||||
class ExaminationForm(ModelForm):
|
||||
class Meta:
|
||||
model = Examination
|
||||
fields = ['examination']
|
||||
|
||||
|
||||
class StructureForm(ModelForm):
|
||||
class Meta:
|
||||
model = Structure
|
||||
fields = ['structure']
|
||||
|
||||
|
||||
class BodyPartForm(ModelForm):
|
||||
class Meta:
|
||||
model = BodyPart
|
||||
fields = ['bodypart']
|
||||
Reference in New Issue
Block a user