mirror of
				https://github.com/ae-utbm/sith.git
				synced 2025-11-04 02:53:06 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			27 lines
		
	
	
		
			626 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			27 lines
		
	
	
		
			626 B
		
	
	
	
		
			Python
		
	
	
	
	
	
from pydantic import TypeAdapter
 | 
						|
 | 
						|
from club.models import Club
 | 
						|
from club.schemas import SimpleClubSchema
 | 
						|
from core.views.widgets.ajax_select import (
 | 
						|
    AutoCompleteSelect,
 | 
						|
    AutoCompleteSelectMultiple,
 | 
						|
)
 | 
						|
 | 
						|
_js = ["bundled/club/components/ajax-select-index.ts"]
 | 
						|
 | 
						|
 | 
						|
class AutoCompleteSelectClub(AutoCompleteSelect):
 | 
						|
    component_name = "club-ajax-select"
 | 
						|
    model = Club
 | 
						|
    adapter = TypeAdapter(list[SimpleClubSchema])
 | 
						|
 | 
						|
    js = _js
 | 
						|
 | 
						|
 | 
						|
class AutoCompleteSelectMultipleClub(AutoCompleteSelectMultiple):
 | 
						|
    component_name = "club-ajax-select"
 | 
						|
    model = Club
 | 
						|
    adapter = TypeAdapter(list[SimpleClubSchema])
 | 
						|
 | 
						|
    js = _js
 |