X-Git-Url: https://git.openstreetmap.org./osqa.git/blobdiff_plain/a9eef437702d5df7a2f97010e6798c689371808c..2d85b056fcba28af281407e80b7c4c4c61229fd3:/forum_modules/pgfulltext/__init__.py diff --git a/forum_modules/pgfulltext/__init__.py b/forum_modules/pgfulltext/__init__.py old mode 100755 new mode 100644 index ec4892c..20cd355 --- a/forum_modules/pgfulltext/__init__.py +++ b/forum_modules/pgfulltext/__init__.py @@ -1,9 +1,10 @@ -NAME = 'Postgresql Full Text Search' -DESCRIPTION = "Enables PostgreSql full text search functionality." - -try: - import psycopg2 - CAN_ENABLE = True -except: - CAN_ENABLE = False +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