mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-11 04:19:25 +00:00
apply ruff rule A005
This commit is contained in:
26
sas/widgets/ajax_select.py
Normal file
26
sas/widgets/ajax_select.py
Normal file
@ -0,0 +1,26 @@
|
||||
from pydantic import TypeAdapter
|
||||
|
||||
from core.views.widgets.ajax_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
|
Reference in New Issue
Block a user