fixing editor bootstrap configuration
[redakcja.git] / apps / catalogue / forms.py
index 9d18a92..285e58e 100644 (file)
@@ -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['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()
 
     def clean(self):
         super(DocumentCreateForm, self).clean()