summaryrefslogtreecommitdiffstats
path: root/settings.py
diff options
context:
space:
mode:
authorunknown <COOL@.(none)>2010-02-02 20:25:01 +0000
committerunknown <COOL@.(none)>2010-02-02 20:25:01 +0000
commit5cb2d6678b62daf6f39e282cec557e20c08e8822 (patch)
treeffd8b276aeec0bddfab9711d717147a4f55a7ef9 /settings.py
parent37a2c0e1d529cfcaa7dab0d692e467cf81ad880b (diff)
downloadaskbot-5cb2d6678b62daf6f39e282cec557e20c08e8822.tar.gz
askbot-5cb2d6678b62daf6f39e282cec557e20c08e8822.tar.bz2
askbot-5cb2d6678b62daf6f39e282cec557e20c08e8822.zip
added full text search support for postgresql, database setup is done as a response to the post_syncdb signal. search is done against question summary, title and tags with crescent weight respectively. everything works but is still in a early stage of development
Diffstat (limited to 'settings.py')
-rwxr-xr-xsettings.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/settings.py b/settings.py
index 8609418e..c7319f87 100755
--- a/settings.py
+++ b/settings.py
@@ -80,6 +80,12 @@ if USE_SPHINX_SEARCH:
if USE_FB_CONNECT:
INSTALLED_APPS.append('fbconnect')
+if DATABASE_ENGINE in ('postgresql_psycopg2', 'postgresql', ):
+ USE_PG_FTS = True
+ INSTALLED_APPS.append('pgfulltext')
+else:
+ USE_PG_FTS = False
+
#load optional plugin module for external password login
if 'USE_EXTERNAL_LEGACY_LOGIN' in locals() and USE_EXTERNAL_LEGACY_LOGIN:
INSTALLED_APPS.append(EXTERNAL_LEGACY_LOGIN_MODULE)
@@ -92,3 +98,6 @@ if 'USE_EXTERNAL_LEGACY_LOGIN' in locals() and USE_EXTERNAL_LEGACY_LOGIN:
return __import__(EXTERNAL_LEGACY_LOGIN_MODULE, [], [], ['api','forms','views'])
else:
LOAD_EXTERNAL_LOGIN_APP = lambda: None
+
+
+