mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-23 06:33:21 +00:00
Sli
7b41051d0d
* Don't tie the output name to webpack itself * Don't call js bundling webpack in python code * Make the doc more generic about js bundling
27 lines
610 B
Python
27 lines
610 B
Python
from pydantic import TypeAdapter
|
|
|
|
from core.views.widgets.select import (
|
|
AutoCompleteSelect,
|
|
AutoCompleteSelectMultiple,
|
|
)
|
|
from sas.models import Album
|
|
from sas.schemas import AlbumSchema
|
|
|
|
_js = ["bundled/sas/components/ajax-select-index.ts"]
|
|
|
|
|
|
class AutoCompleteSelectAlbum(AutoCompleteSelect):
|
|
component_name = "album-ajax-select"
|
|
model = Album
|
|
adapter = TypeAdapter(list[AlbumSchema])
|
|
|
|
js = _js
|
|
|
|
|
|
class AutoCompleteSelectMultipleAlbum(AutoCompleteSelectMultiple):
|
|
component_name = "album-ajax-select"
|
|
model = Album
|
|
adapter = TypeAdapter(list[AlbumSchema])
|
|
|
|
js = _js
|