summaryrefslogtreecommitdiffstats
path: root/askbot/migrations
diff options
context:
space:
mode:
authorAdolfo Fitoria <adolfo.fitoria@gmail.com>2012-11-22 15:08:34 -0600
committerAdolfo Fitoria <adolfo.fitoria@gmail.com>2012-11-22 15:08:34 -0600
commita84d16b5144ddc254b4d1edb0b286fd423e3477f (patch)
tree2ecc8d2552f2efffde0bc1c2bef882649beb327a /askbot/migrations
parentd0d895aa37a2640aa7a8f033541abbca5bd5e71e (diff)
downloadaskbot-a84d16b5144ddc254b4d1edb0b286fd423e3477f.tar.gz
askbot-a84d16b5144ddc254b4d1edb0b286fd423e3477f.tar.bz2
askbot-a84d16b5144ddc254b4d1edb0b286fd423e3477f.zip
Changed the way on how askbot does django version check.
Diffstat (limited to 'askbot/migrations')
-rw-r--r--askbot/migrations/0156_add_message_model_in_new_django.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/askbot/migrations/0156_add_message_model_in_new_django.py b/askbot/migrations/0156_add_message_model_in_new_django.py
index 950196fa..a962b2b4 100644
--- a/askbot/migrations/0156_add_message_model_in_new_django.py
+++ b/askbot/migrations/0156_add_message_model_in_new_django.py
@@ -5,13 +5,15 @@ from south.v2 import SchemaMigration
from django.db import models, connection
import django
+DJANGO_VERSION = django.VERSION[:2]
+
def db_table_exists(table_name):
return table_name in connection.introspection.table_names()
class Migration(SchemaMigration):
def forwards(self, orm):
- if django.get_version() > '1.3.1' and not db_table_exists('auth_message'):
+ if DJANGO_VERSION > (1, 3) and not db_table_exists('auth_message'):
db.create_table('auth_message', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('user', self.gf('django.db.models.fields.related.ForeignKey')(related_name='_message_set', to=orm['auth.User'])),