summaryrefslogtreecommitdiff
path: root/app/ccg_notes/forms.py
diff options
context:
space:
mode:
Diffstat (limited to 'app/ccg_notes/forms.py')
-rw-r--r--app/ccg_notes/forms.py16
1 files changed, 9 insertions, 7 deletions
diff --git a/app/ccg_notes/forms.py b/app/ccg_notes/forms.py
index 5de83bd..0934306 100644
--- a/app/ccg_notes/forms.py
+++ b/app/ccg_notes/forms.py
@@ -1,15 +1,17 @@
from django import forms
-import autocomplete_light
-from autocomplete_light.contrib.taggit_field import TaggitField, TaggitWidget
+import dal
+from dal_select2_taggit.widgets import TaggitSelect2
from .models import CcgNote
+from dal import autocomplete
-class CcgNoteForm(forms.ModelForm):
- tags = TaggitField(widget=TaggitWidget('TagAutocomplete'))
-
+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}),
}
- fields = '__all__'
- model = CcgNote