Blob Blame History Raw
From 08bc8e5efc0e89bbce4ca2a3bf5a5bcdb49ae43c Mon Sep 17 00:00:00 2001
From: Tim Child <tim@timc3.com>
Date: Mon, 9 Feb 2015 10:30:50 +0100
Subject: [PATCH] Django 1.8 compatibility

Django 1.8 has changed the way that the database backends are loaded, https://github.com/django/django/pull/3899
---
 django_nose/runner.py | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/django_nose/runner.py b/django_nose/runner.py
index ee21cab..d291913 100644
--- a/django_nose/runner.py
+++ b/django_nose/runner.py
@@ -20,7 +20,13 @@
 from django.core.management.color import no_style
 from django.core.management.commands.loaddata import Command
 from django.db import connections, transaction, DEFAULT_DB_ALIAS
-from django.db.backends.creation import BaseDatabaseCreation
+
+try:
+    from django.db.backends.base.creation import BaseDatabaseCreation
+except ImportError:
+    # Django < 1.7
+    from django.db.backends.creation import BaseDatabaseCreation    
+
 from django.utils.importlib import import_module
 
 try: