summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2007-09-15 16:18:44 +0000
committerMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2007-09-15 16:18:44 +0000
commit1788b0c96fe2afdd8b14ab1ca06f27ce4f31ba8d (patch)
treefb6826446b03222db300cc41f79e6e37d702679e
parentd30badc0eccbb05b54a5cb4c9fc146d6b4ba6010 (diff)
Variable renaming. I didn't feel comfortable with the tricky re-aliasing in the line table_list=table_list().
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6290 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r--django/core/management/commands/syncdb.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/django/core/management/commands/syncdb.py b/django/core/management/commands/syncdb.py
index c1f360a985..202ad004f0 100644
--- a/django/core/management/commands/syncdb.py
+++ b/django/core/management/commands/syncdb.py
@@ -40,14 +40,14 @@ class Command(NoArgsCommand):
# Get a list of all existing database tables,
# so we know what needs to be added.
- table_list = table_list()
+ tables = table_list()
if connection.features.uses_case_insensitive_names:
table_name_converter = str.upper
else:
table_name_converter = lambda x: x
# Get a list of already installed *models* so that references work right.
- seen_models = installed_models(table_list)
+ seen_models = installed_models(tables)
created_models = set()
pending_references = {}
@@ -59,7 +59,7 @@ class Command(NoArgsCommand):
# Create the model's database table, if it doesn't already exist.
if verbosity >= 2:
print "Processing %s.%s model" % (app_name, model._meta.object_name)
- if table_name_converter(model._meta.db_table) in table_list:
+ if table_name_converter(model._meta.db_table) in tables:
continue
sql, references = sql_model_create(model, self.style, seen_models)
seen_models.add(model)
@@ -71,7 +71,7 @@ class Command(NoArgsCommand):
print "Creating table %s" % model._meta.db_table
for statement in sql:
cursor.execute(statement)
- table_list.append(table_name_converter(model._meta.db_table))
+ tables.append(table_name_converter(model._meta.db_table))
# Create the m2m tables. This must be done after all tables have been created
# to ensure that all referred tables will exist.