Sith/sas/widgets/select.py
2024-10-21 10:30:35 +02:00

26 lines
638 B
Python

from django.forms import Select, SelectMultiple
from core.views.widgets.select import AutoCompleteSelectMixin
from sas.models import Album
from sas.schemas import AlbumSchema
class AutoCompleteSelectAlbum(AutoCompleteSelectMixin, Select):
component_name = "album-ajax-select"
model = Album
schema = AlbumSchema
js = [
"webpack/sas/components/ajax-select-index.ts",
]
class AutoCompleteSelectMultipleAlbum(AutoCompleteSelectMixin, SelectMultiple):
component_name = "album-ajax-select"
model = Album
schema = AlbumSchema
js = [
"webpack/sas/components/ajax-select-index.ts",
]