From 1fd4bd33ced8f5be511f4a17f168a210bf568792 Mon Sep 17 00:00:00 2001 From: Sanjay B Date: Sun, 2 Aug 2015 13:10:59 +0530 Subject: [PATCH] make some fields in production non-required --- itf/itfprofiles/forms.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/itf/itfprofiles/forms.py b/itf/itfprofiles/forms.py index 9a507a9..f4c5437 100644 --- a/itf/itfprofiles/forms.py +++ b/itf/itfprofiles/forms.py @@ -247,11 +247,11 @@ PersonProductionInline = itf_inlineformset_factory(Production, PersonProduction, class ProductionForm(ItfForm): inlines = [PersonProductionInline, AwardsInline, EventsInline] - script = forms.ModelChoiceField(Script.objects.all(), widget=AutocompleteAddWidget(model_class=Script)) - languages = forms.ModelMultipleChoiceField(Language.objects.all(), widget=forms.CheckboxSelectMultiple()) - director = forms.ModelChoiceField(Person.objects.all(), widget=AutocompleteAddWidget(model_class=Person)) - playwright = forms.ModelChoiceField(Person.objects.all(), widget=AutocompleteAddWidget(model_class=Person)) - group = forms.ModelChoiceField(TheatreGroup.objects.all(), widget=AutocompleteAddWidget(model_class=TheatreGroup)) + script = forms.ModelChoiceField(Script.objects.all(), required=False, widget=AutocompleteAddWidget(model_class=Script)) + languages = forms.ModelMultipleChoiceField(Language.objects.all(), required=False, widget=forms.CheckboxSelectMultiple()) + director = forms.ModelChoiceField(Person.objects.all(), required=False, widget=AutocompleteAddWidget(model_class=Person)) + playwright = forms.ModelChoiceField(Person.objects.all(), required=False, widget=AutocompleteAddWidget(model_class=Person)) + group = forms.ModelChoiceField(TheatreGroup.objects.all(), required=False, widget=AutocompleteAddWidget(model_class=TheatreGroup)) class Meta: model = Production exclude = ('added_by',)