fix typo, make languages checkbox in production form
This commit is contained in:
parent
993305d182
commit
6091fe3fe4
|
@ -196,6 +196,7 @@ PersonProductionInline = itf_inlineformset_factory(Production, PersonProduction,
|
|||
class ProductionForm(ItfForm):
|
||||
inlines = [PersonProductionInline, AwardsInline]
|
||||
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))
|
||||
|
|
|
@ -330,7 +330,7 @@ class Production(ItfModel):
|
|||
|
||||
def get_dict(self):
|
||||
rel_level1 = [obj for obj in Production.objects.filter(script= self.script)]
|
||||
rel_level2 = list(set(obj.productions_set.all() for obj in self.related_scripts.all()))
|
||||
rel_level2 = list(set(obj.productions_set.all() for obj in self.script.related_scripts.all()))
|
||||
|
||||
return {
|
||||
'name': self.name,
|
||||
|
|
Loading…
Reference in New Issue
Block a user