fix typo, make languages checkbox in production form

This commit is contained in:
Sanj 2012-09-04 03:22:36 +05:30
parent 993305d182
commit 6091fe3fe4
2 changed files with 2 additions and 1 deletions

View File

@ -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))

View File

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