From 75fdc8069ecb9f0cd2cfa0686e3d03a3afe4bc20 Mon Sep 17 00:00:00 2001 From: luxagraf Date: Thu, 22 Mar 2018 11:42:50 -0500 Subject: fixed some autocomplete bugs --- app/sightings/forms.py | 4 +--- app/sightings/views.py | 1 + 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'app/sightings') diff --git a/app/sightings/forms.py b/app/sightings/forms.py index 9be7dcc..bbc471f 100644 --- a/app/sightings/forms.py +++ b/app/sightings/forms.py @@ -8,7 +8,5 @@ class SightingsForm(autocomplete.FutureModelForm): model = Sighting fields = ('ap', 'point', ) widgets = { - 'ap': autocomplete.TaggitSelect2( - 'ap-autocomplete' - ) + 'ap': autocomplete.ModelSelect2(url='ap-autocomplete') } diff --git a/app/sightings/views.py b/app/sightings/views.py index 016e437..e982771 100644 --- a/app/sightings/views.py +++ b/app/sightings/views.py @@ -57,3 +57,4 @@ class APAutocomplete(autocomplete.Select2QuerySetView): if self.q: qs = qs.filter(common_name__istartswith=self.q) return qs + -- cgit v1.2.3-70-g09d2