I'm trying to get all objects which has the searchWord as a substring, in the column symbol.
if the searchWord is G, and there's five stock objects that exist:
results = stock.objects.all().filter(symbol=searchWord)
for x in results:
results = stock.objects.all().filter(symbol__startswith=searchWord)
This will check for the case-sensitive
searchWord as prefix for the values in
symbol coloumn. In case you want to do case-insensitive prefix check, use