.
This commit is contained in:
+9
-13
@@ -8,12 +8,7 @@ from django.forms import (
|
||||
)
|
||||
from django.forms import inlineformset_factory
|
||||
|
||||
from atlas.models import (
|
||||
Case,
|
||||
Series,
|
||||
SeriesImage,
|
||||
SeriesFindings
|
||||
)
|
||||
from atlas.models import Case, Series, SeriesImage, SeriesFinding
|
||||
|
||||
from anatomy.models import Modality
|
||||
|
||||
@@ -33,9 +28,9 @@ class ExaminationForm(ModelForm):
|
||||
fields = ["examination"]
|
||||
|
||||
|
||||
class SeriesFindingsForm(ModelForm):
|
||||
class SeriesFindingForm(ModelForm):
|
||||
class Meta:
|
||||
model = SeriesFindings
|
||||
model = SeriesFinding
|
||||
exclude = ["series", "annotation_json"]
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
@@ -47,10 +42,11 @@ class SeriesFindingsForm(ModelForm):
|
||||
# a list of primary key for the selected data.
|
||||
initial["series"] = kwargs.pop("series_id")
|
||||
|
||||
super(SeriesFindingsForm, self).__init__(*args, **kwargs)
|
||||
super(SeriesFindingForm, self).__init__(*args, **kwargs)
|
||||
|
||||
ModelForm.__init__(self, *args, **kwargs)
|
||||
|
||||
|
||||
class SeriesForm(ModelForm):
|
||||
class Media:
|
||||
# Django also includes a few javascript files necessary
|
||||
@@ -163,9 +159,9 @@ class CaseForm(ModelForm):
|
||||
"subspecialty",
|
||||
"description",
|
||||
"history",
|
||||
#"findings",
|
||||
# "findings",
|
||||
"condition",
|
||||
#"sign",
|
||||
# "sign",
|
||||
"open_access",
|
||||
]
|
||||
# fields = ['question', 'findings', 'subspecialty', 'references']
|
||||
@@ -173,8 +169,8 @@ class CaseForm(ModelForm):
|
||||
# "normal": RadioSelect(
|
||||
# choices=[(True, 'Yes'),
|
||||
# (False, 'No')])
|
||||
#"findings": TinyMCE(attrs={"cols": 80, "rows": 20}),
|
||||
#"mark_scheme": TinyMCE(attrs={"cols": 80, "rows": 30}),
|
||||
# "findings": TinyMCE(attrs={"cols": 80, "rows": 20}),
|
||||
# "mark_scheme": TinyMCE(attrs={"cols": 80, "rows": 30}),
|
||||
"description": Textarea(attrs={"cols": 80, "rows": 5}),
|
||||
"history": Textarea(attrs={"cols": 80, "rows": 5}),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user