from django import forms import dal from dal_select2_taggit.widgets import TaggitSelect2 from .models import CcgNote from dal import autocomplete class CcgNoteForm(autocomplete.FutureModelForm): class Meta: model = CcgNote fields = ('tags',) widgets = { 'tags': autocomplete.TaggitSelect2( 'tag-autocomplete' ), 'body_markdown': forms.Textarea(attrs={'rows': 18, 'cols': 60}), }