1👍
✅
Because you’re passing a QuerySet into the context. Instead, try appending values() to your query which will return a dictionary.
results = Title.objects.filter(title__contains=q).values()
Source:stackexchange.com