diff --git a/django/core/management/commands/syncdb.py b/django/core/management/commands/syncdb.py index 0265cd2267..f7b694d6e7 100644 --- a/django/core/management/commands/syncdb.py +++ b/django/core/management/commands/syncdb.py @@ -12,7 +12,7 @@ class Command(NoArgsCommand): args = '[--verbosity] [--noinput]' def handle_noargs(self, **options): - from django.db import backend, connection, transaction, models + from django.db import connection, transaction, models from django.conf import settings from django.core.management.sql import table_list, installed_models, sql_model_create, sql_for_pending_references, many_to_many_sql_for_model, custom_sql_for_model, sql_indexes_for_model, emit_post_sync_signal diff --git a/django/core/management/sql.py b/django/core/management/sql.py index 0857c4a9e7..4db32fda74 100644 --- a/django/core/management/sql.py +++ b/django/core/management/sql.py @@ -214,7 +214,7 @@ def sql_model_create(model, style, known_models=set()): Returns the SQL required to create a single model, as a tuple of: (list_of_sql, pending_references_dict) """ - from django.db import backend, connection, models + from django.db import connection, models opts = model._meta final_output = [] @@ -282,7 +282,7 @@ def sql_for_pending_references(model, style, pending_references): """ Returns any ALTER TABLE statements to add constraints after the fact. """ - from django.db import backend, connection + from django.db import connection from django.db.backends.util import truncate_name qn = connection.ops.quote_name @@ -307,7 +307,7 @@ def sql_for_pending_references(model, style, pending_references): return final_output def many_to_many_sql_for_model(model, style): - from django.db import backend, connection, models + from django.db import connection, models from django.contrib.contenttypes import generic opts = model._meta @@ -390,7 +390,7 @@ def custom_sql_for_model(model): def sql_indexes_for_model(model, style): "Returns the CREATE INDEX SQL statements for a single model" - from django.db import backend, connection + from django.db import connection output = [] qn = connection.ops.quote_name diff --git a/django/db/backends/oracle/base.py b/django/db/backends/oracle/base.py index f4f602ff0d..acebd75cb3 100644 --- a/django/db/backends/oracle/base.py +++ b/django/db/backends/oracle/base.py @@ -264,7 +264,7 @@ def get_trigger_name(table): def get_query_set_class(DefaultQuerySet): "Create a custom QuerySet class for Oracle." - from django.db import backend, connection + from django.db import connection from django.db.models.query import EmptyResultSet, GET_ITERATOR_CHUNK_SIZE, quote_only_if_word class OracleQuerySet(DefaultQuerySet): diff --git a/django/db/models/__init__.py b/django/db/models/__init__.py index 2203cbb6fd..4c712a0dc2 100644 --- a/django/db/models/__init__.py +++ b/django/db/models/__init__.py @@ -1,7 +1,7 @@ from django.conf import settings from django.core.exceptions import ObjectDoesNotExist, ImproperlyConfigured from django.core import validators -from django.db import backend, connection +from django.db import connection from django.db.models.loading import get_apps, get_app, get_models, get_model, register_models from django.db.models.query import Q from django.db.models.manager import Manager diff --git a/django/db/models/base.py b/django/db/models/base.py index 670eeb4a14..a3478445f7 100644 --- a/django/db/models/base.py +++ b/django/db/models/base.py @@ -6,7 +6,7 @@ from django.db.models.fields import AutoField, ImageField, FieldDoesNotExist from django.db.models.fields.related import OneToOneRel, ManyToOneRel from django.db.models.query import delete_objects from django.db.models.options import Options, AdminOptions -from django.db import connection, backend, transaction +from django.db import connection, transaction from django.db.models import signals from django.db.models.loading import register_models, get_model from django.dispatch import dispatcher diff --git a/django/db/models/fields/related.py b/django/db/models/fields/related.py index 8d541bd078..7d28ba1d73 100644 --- a/django/db/models/fields/related.py +++ b/django/db/models/fields/related.py @@ -1,4 +1,4 @@ -from django.db import backend, connection, transaction +from django.db import connection, transaction from django.db.models import signals, get_model from django.db.models.fields import AutoField, Field, IntegerField, PositiveIntegerField, PositiveSmallIntegerField, get_ul_class from django.db.models.related import RelatedObject