From 83fe38ae30fe6053f378c4adfc4387f2e8bd030c Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Sat, 7 Jun 2014 21:10:44 -0400 Subject: [PATCH] [1.7.x] Removed usage of deprecated django.utils.importlib. Backport of 1e84d261d6 from master --- django/db/migrations/writer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/django/db/migrations/writer.py b/django/db/migrations/writer.py index d709c91707..88145733ec 100644 --- a/django/db/migrations/writer.py +++ b/django/db/migrations/writer.py @@ -12,7 +12,7 @@ import types from django.apps import apps from django.db import models from django.db.migrations.loader import MigrationLoader -from django.utils import datetime_safe, six, importlib +from django.utils import datetime_safe, six from django.utils.encoding import force_text from django.utils.functional import Promise @@ -296,7 +296,7 @@ class MigrationWriter(object): # Python 2/fallback version module_name = value.__module__ # Make sure it's actually there and not an unbound method - module = importlib.import_module(module_name) + module = import_module(module_name) if not hasattr(module, value.__name__): raise ValueError( "Could not find function %s in %s.\nPlease note that "