Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Remove a bunch of deadcode/dead imports.

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent 807b2a8 commit 345c4c4629c8d17a8b4826fb4b97a61f19326e9f @alex alex committed
4 django/db/backends/
@@ -61,7 +61,7 @@ def sql_create_model(self, model, style, known_models=set()):
if f.rel:
ref_output, pending = self.sql_for_inline_foreign_key_references(f, known_models, style)
if pending:
- pr = pending_references.setdefault(, []).append((model, f))
+ pending_references.setdefault(, []).append((model, f))
table_output.append(' '.join(field_output))
@@ -267,7 +267,7 @@ def create_test_db(self, verbosity=1, autoclobber=False):
# 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
1  django/db/models/
@@ -474,7 +474,6 @@ def save_base(self, raw=False, cls=None, origin=None, force_insert=False,
('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__
2  django/db/models/
@@ -9,7 +9,7 @@
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.
7 django/db/models/sql/
@@ -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 @@ def as_sql(self):
Creates the SQL for this query. Returns the SQL string and list of
- from django.db.models.base import Model
if not self.query.values:
return '', ()
3  django/db/models/sql/
@@ -15,7 +15,7 @@
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 @@ def deferred_to_data(self, target, callback):
field_names, defer = self.deferred_loading
if not field_names:
- columns = set()
orig_opts = self.model._meta
seen = {}
if orig_opts.proxy:

0 comments on commit 345c4c4

Please sign in to comment.
Something went wrong with that request. Please try again.