Full-text multi-table search application for Django. Easy to install and use, with good performance.
Find a file
Krukas fd414aae45 [BUGFIX] #255 Fixed MySQL tests failing mysql + admin context
The admin tests failed because of the following error:

(admin.E404) 'django.contrib.messages.context_processors.messages' must be enabled in DjangoTemplates (TEMPLATES) in order to use the admin application.

This is fixed by adding
'django.contrib.messages.context_processors.messages' tot the context_processors

The MySQL tests failed on the error:

django.db.utils.OperationalError: (1055, "Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'test_test_project.watson_searchentry.title' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by")

After some diging this hapens because the qeuryset count uses an annotation/aggrogation.
37f8f29377/django/db/models/sql/query.py (L510)

Based on what django recomends for setting the sql_mode to https://docs.djangoproject.com/en/2.2/ref/databases/#setting-sql-mode.
And the recomandation from
https://code.djangoproject.com/ticket/15940#comment:10 to always explicitly set the sql_mode.

I have updated the test MySQL settings to set the sql_mode to STRICT_TRANS_TABLES
2019-11-01 09:49:49 +01:00
tests [BUGFIX] #255 Fixed MySQL tests failing mysql + admin context 2019-11-01 09:49:49 +01:00
watson [BUGFIX] Fixed buildwatson error with no admin installed 2019-10-30 17:12:41 +01:00
.coveragerc Combining coverage report, and adding flake8 to tox 2016-11-08 11:58:04 +00:00
.gitignore Trying to lose tox. It's been a right pain. 2017-12-21 16:08:28 +00:00
.travis.yml Test against Django 2.1 2018-09-17 20:43:44 +01:00
CHANGELOG.markdown Updating changelog 2018-02-23 16:22:17 +00:00
LICENSE Adding in setup.py cruft. 2012-02-06 13:31:25 +00:00
MANIFEST.in Added flake8, fixed syntax, flattened package structure 2016-11-07 21:33:33 +01:00
README.markdown Point PyPI badge at correct project 2018-09-18 21:20:53 +01:00
setup.cfg Trying to lose tox. It's been a right pain. 2017-12-21 16:08:28 +00:00
setup.py Trying to lose tox. It's been a right pain. 2017-12-21 16:08:28 +00:00

django-watson

Build Status PyPI GitHub license

django-watson is a fast multi-model full-text search plugin for Django.

It is easy to install and use, and provides high quality search results.

Features

  • Search across multiple models.
  • Order results by relevance.
  • No need to install additional third-party modules or services.
  • Fast and scaleable enough for most use cases.
  • Supports Django 1.8+, Python 2.7+.

Documentation

Please read the Getting Started guide for more information.

Download instructions, bug reporting and links to full documentation can be found at the main project website.

You can keep up to date with the latest announcements by joining the django-watson discussion group.

Contributing

Bug reports, bug fixes, and new features are always welcome. Please raise issues on the django-watson github repository, and submit pull requests for any new code.

You can run the test suite yourself from within a virtual environment with the following commands.

    pip install psycopg2 mysqlclient -e .
    tests/runtests.py
    tests/runtests.py -d psql
    tests/runtests.py -d mysql

More information

The django-watson project was developed by Dave Hall. You can get the code from the django-watson project site.

Dave Hall is a freelance web developer, based in Cambridge, UK. You can usually find him on the Internet in a number of different places: