3 from django.db import connection, transaction
4 from django.conf import settings
8 if settings.DATABASE_ENGINE in ('postgresql_psycopg2', 'postgresql', ):
9 from django.db.models.signals import post_syncdb
12 f = open(os.path.join(os.path.dirname(__file__), 'pg_fts_install.sql'), 'r')
15 cursor = connection.cursor()
16 cursor.execute(f.read())
17 transaction.commit_unless_managed()
25 post_syncdb.connect(install_pg_fts, sender=forum.models, weak=False)