mirror of https://github.com/django/django.git
Remove a bunch of deadcode/dead imports.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16794 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
807b2a8216
commit
345c4c4629
|
@ -61,7 +61,7 @@ class BaseDatabaseCreation(object):
|
|||
if f.rel:
|
||||
ref_output, pending = self.sql_for_inline_foreign_key_references(f, known_models, style)
|
||||
if pending:
|
||||
pr = pending_references.setdefault(f.rel.to, []).append((model, f))
|
||||
pending_references.setdefault(f.rel.to, []).append((model, f))
|
||||
else:
|
||||
field_output.extend(ref_output)
|
||||
table_output.append(' '.join(field_output))
|
||||
|
@ -267,7 +267,7 @@ class BaseDatabaseCreation(object):
|
|||
|
||||
# Get a cursor (even though we don't need one yet). This has
|
||||
# the side effect of initializing the test database.
|
||||
cursor = self.connection.cursor()
|
||||
self.connection.cursor()
|
||||
|
||||
return test_database_name
|
||||
|
||||
|
|
|
@ -474,7 +474,6 @@ class Model(object):
|
|||
('raw', 'cls', and 'origin').
|
||||
"""
|
||||
using = using or router.db_for_write(self.__class__, instance=self)
|
||||
connection = connections[using]
|
||||
assert not (force_insert and force_update)
|
||||
if cls is None:
|
||||
cls = self.__class__
|
||||
|
|
|
@ -9,7 +9,7 @@ from django.db.models.fields import AutoField
|
|||
from django.db.models.query_utils import (Q, select_related_descend,
|
||||
deferred_class_factory, InvalidQuery)
|
||||
from django.db.models.deletion import Collector
|
||||
from django.db.models import signals, sql
|
||||
from django.db.models import sql
|
||||
from django.utils.functional import partition
|
||||
|
||||
# Used to control how many objects are worked with at once in some cases (e.g.
|
||||
|
|
|
@ -1,14 +1,13 @@
|
|||
from itertools import izip
|
||||
|
||||
from django.core.exceptions import FieldError
|
||||
from django.db import connections
|
||||
from django.db import transaction
|
||||
from django.db.backends.util import truncate_name
|
||||
from django.db.models.query_utils import select_related_descend
|
||||
from django.db.models.sql.constants import *
|
||||
from django.db.models.sql.datastructures import EmptyResultSet
|
||||
from django.db.models.sql.expressions import SQLEvaluator
|
||||
from django.db.models.sql.query import (get_proxied_model, get_order_dir,
|
||||
select_related_descend, Query)
|
||||
from django.db.models.sql.query import get_proxied_model, get_order_dir, Query
|
||||
from django.db.utils import DatabaseError
|
||||
|
||||
|
||||
|
@ -875,8 +874,6 @@ class SQLUpdateCompiler(SQLCompiler):
|
|||
Creates the SQL for this query. Returns the SQL string and list of
|
||||
parameters.
|
||||
"""
|
||||
from django.db.models.base import Model
|
||||
|
||||
self.pre_sql_setup()
|
||||
if not self.query.values:
|
||||
return '', ()
|
||||
|
|
|
@ -15,7 +15,7 @@ from django.utils.tree import Node
|
|||
from django.db import connections, DEFAULT_DB_ALIAS
|
||||
from django.db.models import signals
|
||||
from django.db.models.fields import FieldDoesNotExist
|
||||
from django.db.models.query_utils import select_related_descend, InvalidQuery
|
||||
from django.db.models.query_utils import InvalidQuery
|
||||
from django.db.models.sql import aggregates as base_aggregates_module
|
||||
from django.db.models.sql.constants import *
|
||||
from django.db.models.sql.datastructures import EmptyResultSet, Empty, MultiJoin
|
||||
|
@ -567,7 +567,6 @@ class Query(object):
|
|||
field_names, defer = self.deferred_loading
|
||||
if not field_names:
|
||||
return
|
||||
columns = set()
|
||||
orig_opts = self.model._meta
|
||||
seen = {}
|
||||
if orig_opts.proxy:
|
||||
|
|
Loading…
Reference in New Issue