Sith/sas/widgets/select.py

26 lines
638 B
Python
Raw Normal View History

2024-10-21 08:30:35 +00:00
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",
]