mirror of
https://github.com/django/django.git
synced 2025-10-25 14:46:09 +00:00
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:
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user