diff options
Diffstat (limited to 'pgfulltext/management.py')
-rw-r--r-- | pgfulltext/management.py | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/pgfulltext/management.py b/pgfulltext/management.py deleted file mode 100644 index 46f51edc..00000000 --- a/pgfulltext/management.py +++ /dev/null @@ -1,23 +0,0 @@ -import os - -from django.db import connection, transaction -from django.conf import settings - -import forum.models - -if settings.USE_PG_FTS: - from django.db.models.signals import post_syncdb - - def setup_pgfulltext(sender, **kwargs): - if sender == forum.models_: - install_pg_fts() - - post_syncdb.connect(setup_pgfulltext) - -def install_pg_fts(): - f = open(os.path.join(os.path.dirname(__file__), '../sql_scripts/pg_fts_install.sql'), 'r') - cursor = connection.cursor() - cursor.execute(f.read()) - transaction.commit_unless_managed() - f.close() -
\ No newline at end of file |