4👍
✅
You can try
Entry.objects.filter(headline__contains="search text")
or __icontains
for case-insensitive search.
As the django doc says __search
only works with MySQL for now.
2👍
You may try Haystack or user-created library djorm-ext-pgfulltext. Also it is useful to read https://code.djangoproject.com/ticket/4676 and http://bogdan-ivanov.com/entry/full-text-search-postgresql-and-django/
- [Django]-Appending a queryset to a list/tuple without evaluating it
- [Django]-Writing script tag outside or inside block?
- [Django]-How to make certain that the queryset will be ordered by a valid field – django
- [Django]-Import error: No module named 'Crypto' on Mac (Pycrypto is up-to-date)
- [Django]-How to unregister table from django admin whose created when package are installed
0👍
For user reading this question these days:
PostgreSQL Full-Text-Search support is present since Django 1.10 (2016) by the module django.contrib.postgres.search .
- [Django]-Django get current view in template
- [Django]-How can I omit time at HTML {{ post.published_date }} tag?
- [Django]-Django User M2M relationship
Source:stackexchange.com