Allow for creating package.zip containing files in a gallery
[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['template'].queryset = Template.objects.filter(is_main=True)
 
     def clean(self):
         super(DocumentCreateForm, self).clean()