From c298e1d4e7eaa5068f08270d87f7aa20260bc6c3 Mon Sep 17 00:00:00 2001 From: Thomas NOEL Date: Thu, 5 Feb 2015 15:50:23 +0100 Subject: [PATCH] migrate: disable if django 1.7 (#6388) --- .../multitenant/management/commands/migrate.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/entrouvert/djommon/multitenant/management/commands/migrate.py b/entrouvert/djommon/multitenant/management/commands/migrate.py index ffa0fb1..a43849c 100644 --- a/entrouvert/djommon/multitenant/management/commands/migrate.py +++ b/entrouvert/djommon/multitenant/management/commands/migrate.py @@ -3,13 +3,17 @@ # Email: carneiro.be@gmail.com # License: MIT license # Home-page: http://github.com/bcarneiro/django-tenant-schemas +import django from django.conf import settings from django.core.management.base import CommandError, BaseCommand -try: - from south.management.commands.migrate import Command as MigrateCommand -except ImportError: - MigrateCommand = BaseCommand +if django.VERSION < (1, 7, 0): + try: + from south.management.commands.migrate import Command as MigrateCommand + except ImportError: + MigrateCommand = BaseCommand +else: + MigrateCommand = BaseCommand class Command(MigrateCommand):