{"id":23613,"library":"django-watson","title":"django-watson","description":"Full-text multi-table search application for Django. Easy to install and use, with good performance. Current version 1.6.3. Released irregularly, last release Dec 2023.","status":"active","version":"1.6.3","language":"python","source_language":"en","source_url":"https://github.com/etianen/django-watson","tags":["django","search","full-text","database"],"install":[{"cmd":"pip install django-watson","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Core framework requirement","package":"Django","optional":false}],"imports":[{"note":"search_filter is not a public import; use watson.search.filter() or watson.SearchFilter()","wrong":"from watson.search import search_filter","symbol":"search_filter","correct":"from watson import search as watson"},{"note":"SearchAdapter is not directly importable from watson.adapters; use watson.SearchAdapter","wrong":"from watson.adapters import SearchAdapter","symbol":"SearchAdapter","correct":"from watson import search as watson\nwatson.SearchAdapter"}],"quickstart":{"code":"import watson\nfrom myapp.models import Article\n\n# Register models for search\nwatson.register(Article)\n\n# Perform a search\nresults = watson.search(\"query\")","lang":"python","description":"Register model with watson and run a search."},"warnings":[{"fix":"Upgrade Django to 3.2+ and Python to 3.7+","message":"django-watson 1.6.x dropped support for Django < 3.2 and Python < 3.7. Ensure your environment meets these requirements before upgrading.","severity":"breaking","affected_versions":">=1.6.0"},{"fix":"Replace `SearchContextManager` with `SearchContext` in your code.","message":"The `SearchContextManager` class is deprecated in favor of direct `SearchContext` usage.","severity":"deprecated","affected_versions":">=1.6.0"},{"fix":"Place registration calls in the AppConfig.ready() method of your app.","message":"watson.register() must be called after all model definitions (usually at the bottom of models.py or in AppConfig.ready()). Calling it too early may cause missing models.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Add 'watson' to INSTALLED_APPS and ensure WATSON_BACKEND is set (default works).","cause":"Missing 'watson' in INSTALLED_APPS or misconfigured search engine in settings.","error":"django.core.exceptions.ImproperlyConfigured: watson is not a registered search engine."},{"fix":"Run `python manage.py buildwatson` to build the search index, then verify fields contain data.","cause":"The model's search index has not been built or the search fields are empty.","error":"watson.search() returns empty QuerySet despite having data."},{"fix":"Use `import watson` (not `from watson import ...`), then call `watson.register(Model)`.","cause":"Importing watson incorrectly or name collision.","error":"AttributeError: module 'watson' has no attribute 'register'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}