mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-09 19:40:19 +00:00
Remove ajax_select from core
This commit is contained in:
@ -3,8 +3,8 @@ from django.db.models import Model
|
||||
from django.forms import Select, SelectMultiple
|
||||
from ninja import ModelSchema
|
||||
|
||||
from core.models import Group, User
|
||||
from core.schemas import GroupSchema, UserProfileSchema
|
||||
from core.models import Group, SithFile, User
|
||||
from core.schemas import GroupSchema, SithFileSchema, UserProfileSchema
|
||||
|
||||
|
||||
class AutoCompleteSelectMixin:
|
||||
@ -91,3 +91,15 @@ class AutoCompleteSelectMultipleGroup(AutoCompleteSelectMixin, SelectMultiple):
|
||||
component_name = "group-ajax-select"
|
||||
model = Group
|
||||
schema = GroupSchema
|
||||
|
||||
|
||||
class AutoCompleteSelectSithFile(AutoCompleteSelectMixin, Select):
|
||||
component_name = "sith-file-ajax-select"
|
||||
model = SithFile
|
||||
schema = SithFileSchema
|
||||
|
||||
|
||||
class AutoCompleteSelectMultipleSithFile(AutoCompleteSelectMixin, SelectMultiple):
|
||||
component_name = "sith-file-ajax-select"
|
||||
model = SithFile
|
||||
schema = SithFileSchema
|
||||
|
Reference in New Issue
Block a user