mirror of
https://github.com/Hopiu/django-watson.git
synced 2026-04-23 14:34:45 +00:00
Added in is_installed implementation for MySQL.
This commit is contained in:
parent
f09f263cce
commit
6fd002baec
2 changed files with 7 additions and 1 deletions
|
|
@ -198,6 +198,12 @@ def escape_mysql_boolean_query(search_text):
|
|||
|
||||
class MySQLSearchBackend(SearchBackend):
|
||||
|
||||
def is_installed(self):
|
||||
"""Checks whether django-watson is installed."""
|
||||
cursor = connection.cursor()
|
||||
cursor.execute("SHOW INDEX FROM watson_searchentry WHERE Key_name = 'watson_searchentry_fulltext'");
|
||||
return bool(cursor.fetchall())
|
||||
|
||||
def do_install(self):
|
||||
"""Generates the PostgreSQL specific SQL code to install django-watson."""
|
||||
cursor = connection.cursor()
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
"""Adapters for registering models with django-watson."""
|
||||
|
||||
import re
|
||||
import re, sys
|
||||
from threading import local
|
||||
from functools import wraps
|
||||
from weakref import WeakValueDictionary
|
||||
|
|
|
|||
Loading…
Reference in a new issue