- exclude = ['gallery', 'parent', 'parent_number']
- prepopulated_fields = {'slug': ['title']}
+ exclude = ['parent', 'parent_number', 'project']
+
+ def __init__(self, *args, **kwargs):
+ super(DocumentCreateForm, self).__init__(*args, **kwargs)
+ 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)