2๐
โ
I just found the solution to this problem. Please listen up if you want to avoid loosing any of you reputations by placing a bounty on the same problem.
Basically I had to replace my original destination
field in my search_indexes.py document to the following line:
From this: destination = indexes.EdgeNgramField(model_attr="destination")
To this: destination = indexes.CharField(model_attr="destination")
๐คlocq
0๐
Your issue is in your use of dict.get
self.q_from_data = data.get('q', [''])[0]
For example
data.get('q') # This will return the string "Mexico"
data.get('q')[0] # This will return the first letter "M"
The line should be
self.q_from_data = data.get('q', '')
๐คIain Shelvington
- [Django]-Better django model design
- [Django]-AbstractUser Login View
- [Django]-How to write all logs of django console to to custome file file?
- [Django]-Django Imagekit Background Fill
Source:stackexchange.com