Add LLM question import functionality and enhance question model with new fields
This commit is contained in:
@@ -3,6 +3,7 @@ from django.forms import (
|
||||
ModelForm,
|
||||
ModelMultipleChoiceField,
|
||||
ModelChoiceField,
|
||||
CheckboxSelectMultiple,
|
||||
ChoiceField,
|
||||
CharField,
|
||||
)
|
||||
@@ -22,6 +23,8 @@ from django.forms.widgets import RadioSelect, TextInput, Textarea
|
||||
|
||||
from tinymce.widgets import TinyMCE
|
||||
|
||||
from dal import autocomplete
|
||||
|
||||
|
||||
class UserAnswerForm(ModelForm):
|
||||
class Meta:
|
||||
@@ -140,6 +143,11 @@ class QuestionForm(ModelForm):
|
||||
"e_answer",
|
||||
"e_feedback",
|
||||
"best_answer",
|
||||
"finding",
|
||||
"structure",
|
||||
"condition",
|
||||
"presentation",
|
||||
"subspecialty",
|
||||
]
|
||||
|
||||
widgets = {
|
||||
@@ -158,6 +166,19 @@ class QuestionForm(ModelForm):
|
||||
"c_feedback" : TinyMCE(attrs={'cols': 80, 'rows': 4}, mce_attrs={'height': 140}),
|
||||
"d_feedback" : TinyMCE(attrs={'cols': 80, 'rows': 4}, mce_attrs={'height': 140}),
|
||||
"e_feedback" : TinyMCE(attrs={'cols': 80, 'rows': 4}, mce_attrs={'height': 140}),
|
||||
"structure": autocomplete.ModelSelect2Multiple(
|
||||
url="atlas:structure-autocomplete"
|
||||
),
|
||||
"finding": autocomplete.ModelSelect2Multiple(
|
||||
url="atlas:finding-autocomplete"
|
||||
),
|
||||
"condition": autocomplete.ModelSelect2Multiple(
|
||||
url="atlas:condition-autocomplete"
|
||||
),
|
||||
"presentation": autocomplete.ModelSelect2Multiple(
|
||||
url="atlas:presentation-autocomplete"
|
||||
),
|
||||
"subspecialty": CheckboxSelectMultiple(),
|
||||
}
|
||||
|
||||
#widgets = {
|
||||
|
||||
Reference in New Issue
Block a user