2👍
✅
If you’re doing anything more than extremely basic searching, you want a proper full-text database search engine.
Something like django-sphinx might be the answer.
http://github.com/dcramer/django-sphinx
If you’re really only doing it to mess with django, one extremely simple solution is to pull all the results and use a regex to figure out your matches. Obviously this is a terrible solution.
A better solution would be to create a filter adding your search terms onto a query programmatically.
https://docs.djangoproject.com/en/dev/ref/models/querysets/#filter
https://docs.djangoproject.com/en/dev/ref/models/querysets/#contains
Source:stackexchange.com