mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-10 03:49:24 +00:00
Fix deprecated usage of schema json method and avoid multiple inheritance on select widgets
This commit is contained in:
@ -1,25 +1,21 @@
|
||||
from django.forms import Select, SelectMultiple
|
||||
|
||||
from club.models import Club
|
||||
from club.schemas import ClubSchema
|
||||
from core.views.widgets.select import AutoCompleteSelectMixin
|
||||
from core.views.widgets.select import AutoCompleteSelect, AutoCompleteSelectMultiple
|
||||
|
||||
_js = ["webpack/club/components/ajax-select-index.ts"]
|
||||
|
||||
|
||||
class AutoCompleteSelectClub(AutoCompleteSelectMixin, Select):
|
||||
class AutoCompleteSelectClub(AutoCompleteSelect):
|
||||
component_name = "club-ajax-select"
|
||||
model = Club
|
||||
schema = ClubSchema
|
||||
|
||||
js = [
|
||||
"webpack/club/components/ajax-select-index.ts",
|
||||
]
|
||||
js = _js
|
||||
|
||||
|
||||
class AutoCompleteSelectMultipleClub(AutoCompleteSelectMixin, SelectMultiple):
|
||||
class AutoCompleteSelectMultipleClub(AutoCompleteSelectMultiple):
|
||||
component_name = "club-ajax-select"
|
||||
model = Club
|
||||
schema = ClubSchema
|
||||
|
||||
js = [
|
||||
"webpack/club/components/ajax-select-index.ts",
|
||||
]
|
||||
js = _js
|
||||
|
Reference in New Issue
Block a user