X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/840b9bd7443e0048253423f7553809b5542d731c..176630cf8fdfaa410be90cf6299ac1eff3ab0892:/apps/catalogue/forms.py?ds=sidebyside diff --git a/apps/catalogue/forms.py b/apps/catalogue/forms.py index 9d18a921..285e58e5 100644 --- a/apps/catalogue/forms.py +++ b/apps/catalogue/forms.py @@ -28,6 +28,7 @@ class DocumentCreateForm(forms.ModelForm): self.fields['slug'].widget.attrs={'class': 'autoslug'} self.fields['gallery'].widget.attrs={'class': 'autoslug'} self.fields['title'].widget.attrs={'class': 'autoslug-source'} + self.fields['template'].queryset = Template.objects.filter(is_main=True) def clean(self): super(DocumentCreateForm, self).clean()