- exclude = ['gallery', 'parent', 'parent_number']
- prepopulated_fields = {'slug': ['title']}
+ exclude = ['parent', 'parent_number']
+
+ 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'}