2 from forum.models import KeyValue
\r
3 from django.db import connection, transaction
\r
8 if int(settings.PG_FTSTRIGGERS_VERSION) < VERSION:
\r
9 f = open(os.path.join(os.path.dirname(__file__), 'pg_fts_install.sql'), 'r')
\r
12 cursor = connection.cursor()
\r
13 cursor.execute(f.read())
\r
14 transaction.commit_unless_managed()
\r
16 settings.PG_FTSTRIGGERS_VERSION.set_value(VERSION)
\r
18 except Exception, e:
\r
19 #import sys, traceback
\r
20 #traceback.print_exc(file=sys.stdout)
\r