Showing with 7,518 additions and 7,142 deletions.
  1. +1 −2 requirements.txt
  2. +24 −0 swoptact/autocomplete_light_registry.py
  3. +7,489 −7,139 swoptact/static/js/jquery.js
  4. +4 −1 swoptact/templates/admin/base.html
@@ -1,6 +1,5 @@
-e git+https://github.com/yourlabs/django-autocomplete-light.git#egg=autocomplete_light
django<1.9
configobj
django-admin-bootstrapped
django-phonenumber-field
django-static-jquery==2.1.3
django-autocomplete-light
@@ -0,0 +1,24 @@
import autocomplete_light

from swoptact import models

class BaseAutocomplete(autocomplete_light.AutocompleteModelBase):
attrs = {
"placeholder": "",
"data-autocomplete-minimum-characters": 1,
}


# Register the Address
class AddressAutocomplete(BaseAutocomplete):
search_fields = ["name"]
model = models.Address

autocomplete_light.register(AddressAutocomplete)

# Register the Institution
class InstitutionAutocomplete(BaseAutocomplete):
search_fields = ["name"]
model = models.Institution

autocomplete_light.register(InstitutionAutocomplete)