Removed a bunch of legacy django.db.backend imports

git-svn-id: http://code.djangoproject.com/svn/django/trunk@5975 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Adrian Holovaty 2007-08-20 02:28:40 +00:00
parent 1a8f9b2b97
commit 6d8e6090e5
6 changed files with 9 additions and 9 deletions

View File

@ -12,7 +12,7 @@ class Command(NoArgsCommand):
args = '[--verbosity] [--noinput]' args = '[--verbosity] [--noinput]'
def handle_noargs(self, **options): 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.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 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

View File

@ -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: Returns the SQL required to create a single model, as a tuple of:
(list_of_sql, pending_references_dict) (list_of_sql, pending_references_dict)
""" """
from django.db import backend, connection, models from django.db import connection, models
opts = model._meta opts = model._meta
final_output = [] 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. 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 from django.db.backends.util import truncate_name
qn = connection.ops.quote_name qn = connection.ops.quote_name
@ -307,7 +307,7 @@ def sql_for_pending_references(model, style, pending_references):
return final_output return final_output
def many_to_many_sql_for_model(model, style): 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 from django.contrib.contenttypes import generic
opts = model._meta opts = model._meta
@ -390,7 +390,7 @@ def custom_sql_for_model(model):
def sql_indexes_for_model(model, style): def sql_indexes_for_model(model, style):
"Returns the CREATE INDEX SQL statements for a single model" "Returns the CREATE INDEX SQL statements for a single model"
from django.db import backend, connection from django.db import connection
output = [] output = []
qn = connection.ops.quote_name qn = connection.ops.quote_name

View File

@ -264,7 +264,7 @@ def get_trigger_name(table):
def get_query_set_class(DefaultQuerySet): def get_query_set_class(DefaultQuerySet):
"Create a custom QuerySet class for Oracle." "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 from django.db.models.query import EmptyResultSet, GET_ITERATOR_CHUNK_SIZE, quote_only_if_word
class OracleQuerySet(DefaultQuerySet): class OracleQuerySet(DefaultQuerySet):

View File

@ -1,7 +1,7 @@
from django.conf import settings from django.conf import settings
from django.core.exceptions import ObjectDoesNotExist, ImproperlyConfigured from django.core.exceptions import ObjectDoesNotExist, ImproperlyConfigured
from django.core import validators 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.loading import get_apps, get_app, get_models, get_model, register_models
from django.db.models.query import Q from django.db.models.query import Q
from django.db.models.manager import Manager from django.db.models.manager import Manager

View File

@ -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.fields.related import OneToOneRel, ManyToOneRel
from django.db.models.query import delete_objects from django.db.models.query import delete_objects
from django.db.models.options import Options, AdminOptions 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 import signals
from django.db.models.loading import register_models, get_model from django.db.models.loading import register_models, get_model
from django.dispatch import dispatcher from django.dispatch import dispatcher

View File

@ -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 import signals, get_model
from django.db.models.fields import AutoField, Field, IntegerField, PositiveIntegerField, PositiveSmallIntegerField, get_ul_class from django.db.models.fields import AutoField, Field, IntegerField, PositiveIntegerField, PositiveSmallIntegerField, get_ul_class
from django.db.models.related import RelatedObject from django.db.models.related import RelatedObject