Modifie la façon dont les auteurs sont ajoutés

This commit is contained in:
Med 2017-07-05 01:14:57 +02:00
parent ef7625d2a4
commit 8d9be6e439
2 changed files with 3 additions and 2 deletions

View File

@ -30,6 +30,8 @@ class AuteurForm(ModelForm):
fields = '__all__' fields = '__all__'
class MediaForm(ModelForm): class MediaForm(ModelForm):
auteur = forms.ModelMultipleChoiceField(Auteur.objects.all(), widget=forms.CheckboxSelectMultiple, required=False)
class Meta: class Meta:
model = Media model = Media
fields = '__all__' fields = '__all__'

View File

@ -269,11 +269,10 @@ class ClefForm(ModelForm):
fields = '__all__' fields = '__all__'
class AdhesionForm(ModelForm): class AdhesionForm(ModelForm):
adherent = forms.ModelMultipleChoiceField(User.objects.all(), widget=forms.CheckboxSelectMultiple) adherent = forms.ModelMultipleChoiceField(User.objects.all(), widget=forms.CheckboxSelectMultiple, required=False)
class Meta: class Meta:
model = Adhesion model = Adhesion
# fields = ['annee_debut', 'annee_fin']
fields = '__all__' fields = '__all__'
class RightForm(ModelForm): class RightForm(ModelForm):