import autocomplete_light
from .models import Company


class CompanyAutocomplete(autocomplete_light.AutocompleteModelBase):
    search_fields = ['^name']
    model = Company
autocomplete_light.register(CompanyAutocomplete)

import autocomplete_light
from .models import Company


class CompanyAutocomplete(autocomplete_light.AutocompleteModelBase):
    search_fields = ['name', 'official_name', 'common_name']
    model = Company
autocomplete_light.register(CompanyAutocomplete)

Add more search fields to autocomplete
Add more search fields to autocomplete

  import autocomplete_light
  from .models import Company
  
  
  class CompanyAutocomplete(autocomplete_light.AutocompleteModelBase):
-     search_fields = ['^name']
+     search_fields = ['name', 'official_name', 'common_name']
      model = Company
  autocomplete_light.register(CompanyAutocomplete)
  
Add more search fields to autocomplete
## Code Before:
import autocomplete_light
from .models import Company


class CompanyAutocomplete(autocomplete_light.AutocompleteModelBase):
    search_fields = ['^name']
    model = Company
autocomplete_light.register(CompanyAutocomplete)

## Instruction:
Add more search fields to autocomplete
## Code After:
import autocomplete_light
from .models import Company


class CompanyAutocomplete(autocomplete_light.AutocompleteModelBase):
    search_fields = ['name', 'official_name', 'common_name']
    model = Company
autocomplete_light.register(CompanyAutocomplete)
