]> git.openstreetmap.org Git - osqa.git/blobdiff - forum_modules/pgfulltext/__init__.py
adding a new setting that allows to automatically redirect the user's browser to...
[osqa.git] / forum_modules / pgfulltext / __init__.py
old mode 100755 (executable)
new mode 100644 (file)
index ec4892c..20cd355
@@ -1,9 +1,10 @@
-NAME = 'Postgresql Full Text Search'\r
-DESCRIPTION = "Enables PostgreSql full text search functionality."\r
-\r
-try:\r
-    import psycopg2\r
-    CAN_ENABLE = True\r
-except:\r
-    CAN_ENABLE = False\r
+NAME = 'Postgresql Full Text Search'
+DESCRIPTION = "Enables PostgreSql full text search functionality."
+
+try:
+    import psycopg2
+    from django.conf import settings
+    CAN_USE = settings.DATABASE_ENGINE in ('postgresql_psycopg2', 'postgresql', )
+except:
+    CAN_USE = False
     
\ No newline at end of file