diff options
author | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2010-02-02 20:48:41 -0500 |
---|---|---|
committer | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2010-02-02 20:48:41 -0500 |
commit | 955f0853655cd499a12f69ca35768802ddbbac38 (patch) | |
tree | dee4116cbd68064d4d314f913daaaeba748ac90a /pgfulltext/management.py | |
parent | c269397bbc0f9716fa47ddb311cdd37d3954859d (diff) | |
download | askbot-955f0853655cd499a12f69ca35768802ddbbac38.tar.gz askbot-955f0853655cd499a12f69ca35768802ddbbac38.tar.bz2 askbot-955f0853655cd499a12f69ca35768802ddbbac38.zip |
remove experimental and unused files, small cleanups
Diffstat (limited to 'pgfulltext/management.py')
-rw-r--r-- | pgfulltext/management.py | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/pgfulltext/management.py b/pgfulltext/management.py index 453c28eb..04303092 100644 --- a/pgfulltext/management.py +++ b/pgfulltext/management.py @@ -1,23 +1,23 @@ -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()
+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 |