mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2025-07-03 19:22:51 +02:00
Update the teams of a pool
This commit is contained in:
@ -129,3 +129,19 @@ class PoolForm(forms.ModelForm):
|
||||
class Meta:
|
||||
model = Pool
|
||||
fields = ('tournament', 'round', 'juries',)
|
||||
widgets = {
|
||||
"juries": forms.CheckboxSelectMultiple,
|
||||
}
|
||||
|
||||
|
||||
class PoolTeamsForm(forms.ModelForm):
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
self.fields["participations"].queryset = self.instance.tournament.participations.all()
|
||||
|
||||
class Meta:
|
||||
model = Pool
|
||||
fields = ('participations',)
|
||||
widgets = {
|
||||
"participations": forms.CheckboxSelectMultiple,
|
||||
}
|
||||
|
Reference in New Issue
Block a user