1
0
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:
Yohann D'ANELLO
2021-01-14 14:44:12 +01:00
parent 7a6aaa3f58
commit f3f862c1ab
4 changed files with 90 additions and 4 deletions

View File

@ -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,
}