summaryrefslogtreecommitdiffstats
path: root/forum_modules/pgfulltext/management.py
diff options
context:
space:
mode:
authorEvgeny Fadeev <evgeny.fadeev@gmail.com>2010-02-22 22:08:15 -0500
committerEvgeny Fadeev <evgeny.fadeev@gmail.com>2010-02-22 22:08:15 -0500
commit2390d0191c52ae585cda3f1ae6f884cc58639025 (patch)
treedb8fa64e6161e709297997db7986db949ac2500e /forum_modules/pgfulltext/management.py
parenta00d0c172d129986509943218e4c44dc3c40aff4 (diff)
parenta5b2133fa2b8ab205d87fcdc2dd1d6335d37ea3c (diff)
downloadaskbot-2390d0191c52ae585cda3f1ae6f884cc58639025.tar.gz
askbot-2390d0191c52ae585cda3f1ae6f884cc58639025.tar.bz2
askbot-2390d0191c52ae585cda3f1ae6f884cc58639025.zip
merged adolfos branch, dos2unixd everything
Diffstat (limited to 'forum_modules/pgfulltext/management.py')
-rwxr-xr-xforum_modules/pgfulltext/management.py58
1 files changed, 29 insertions, 29 deletions
diff --git a/forum_modules/pgfulltext/management.py b/forum_modules/pgfulltext/management.py
index 89eb1395..487580ff 100755
--- a/forum_modules/pgfulltext/management.py
+++ b/forum_modules/pgfulltext/management.py
@@ -1,29 +1,29 @@
-import os
-
-from django.db import connection, transaction
-from django.conf import settings
-
-import forum.models
-
-if settings.DATABASE_ENGINE in ('postgresql_psycopg2', 'postgresql', ):
- 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__), 'pg_fts_install.sql'), 'r')
-
- try:
- cursor = connection.cursor()
- cursor.execute(f.read())
- transaction.commit_unless_managed()
- except:
- pass
- finally:
- cursor.close()
-
- f.close()
+import os
+
+from django.db import connection, transaction
+from django.conf import settings
+
+import forum.models
+
+if settings.DATABASE_ENGINE in ('postgresql_psycopg2', 'postgresql', ):
+ 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__), 'pg_fts_install.sql'), 'r')
+
+ try:
+ cursor = connection.cursor()
+ cursor.execute(f.read())
+ transaction.commit_unless_managed()
+ except:
+ pass
+ finally:
+ cursor.close()
+
+ f.close()