summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2011-09-15 23:55:30 +0000
committerAlex Gaynor <alex.gaynor@gmail.com>2011-09-15 23:55:30 +0000
commit608548baa200d3945dee419787e3996d3e5a0b15 (patch)
tree1c07178545ac304371ea97b52f8eb8e581308075
parentce48e8e9400c7030e5a351efde172e4bd3230966 (diff)
Fixed #16854 -- corrected an AttributeError coming from the contenttypes post-syncdb hook. Thanks to desh for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16832 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r--django/contrib/contenttypes/management.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/django/contrib/contenttypes/management.py b/django/contrib/contenttypes/management.py
index 5c7e12a847..d47d5579ba 100644
--- a/django/contrib/contenttypes/management.py
+++ b/django/contrib/contenttypes/management.py
@@ -44,7 +44,10 @@ def update_contenttypes(app, created_models, verbosity=2, **kwargs):
# Confirm that the content type is stale before deletion.
if to_remove:
if kwargs.get('interactive', False):
- content_type_display = '\n'.join([' %s | %s' % (ct.app_label, ct.model) for ct in content_types])
+ content_type_display = '\n'.join([
+ ' %s | %s' % (ct.app_label, ct.model)
+ for ct in to_remove
+ ])
ok_to_delete = raw_input("""The following content types are stale and need to be deleted:
%s