When I add a new record in the database, it doesn't appear in the autocomplete results until I restart the python process. My registry looks like this.
import autocomplete_light
from .models import Article
autocomplete_light.register(
Article,
choices=Article.objects.published(),
search_fields=['title', '^id', ],
attrs={
'placeholder': 'Search by Article Name',
},
widget_attrs={
'class': 'modern-style',
},
)
Is the choices option cached?