summaryrefslogtreecommitdiff
path: root/django/db/models/loading.py
diff options
context:
space:
mode:
authorMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2007-04-26 13:30:48 +0000
committerMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2007-04-26 13:30:48 +0000
commit439cb4047fb583d08149f28e2ce66a8edfe0efa7 (patch)
tree47ef30e70bf1d757f08b133d3aa47704db13c714 /django/db/models/loading.py
parent6c02565e4fb92c4cc3bfb45bcc89eb9aa299efdc (diff)
downloaddjango-439cb4047fb583d08149f28e2ce66a8edfe0efa7.tar.gz
Fixed #4040 -- Changed uses of has_key() to "in". Slight performance
improvement and forward-compatible with future Python releases. Patch from Gary Wilson. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5091 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/db/models/loading.py')
-rw-r--r--django/db/models/loading.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/db/models/loading.py b/django/db/models/loading.py
index f4aff2438b..224f5e8451 100644
--- a/django/db/models/loading.py
+++ b/django/db/models/loading.py
@@ -103,7 +103,7 @@ def register_models(app_label, *models):
# in the _app_models dictionary
model_name = model._meta.object_name.lower()
model_dict = _app_models.setdefault(app_label, {})
- if model_dict.has_key(model_name):
+ if model_name in model_dict:
# The same model may be imported via different paths (e.g.
# appname.models and project.appname.models). We use the source
# filename as a means to detect identity.