.
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
from django.contrib.admin import widgets
|
||||
from django.forms import (
|
||||
Form,
|
||||
ModelForm,
|
||||
@@ -35,6 +36,15 @@ class SeriesFindingForm(ModelForm):
|
||||
model = SeriesFinding
|
||||
exclude = ["series", "annotation_json", "viewport_json"]
|
||||
|
||||
widgets = {
|
||||
"finding": autocomplete.ModelSelect2Multiple(
|
||||
url="atlas:finding-autocomplete"
|
||||
),
|
||||
"structure": autocomplete.ModelSelect2Multiple(
|
||||
url="atlas:struture-autocomplete"
|
||||
),
|
||||
}
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
if kwargs.get("series_id"):
|
||||
# We get the 'initial' keyword argument or initialize it
|
||||
|
||||
Reference in New Issue
Block a user