Ticket #16854: patch_for_16854.diff

File patch_for_16854.diff, 845 bytes (added by desh, 4 years ago)

Initial patch against current git head (9323daf2)

  • django/contrib/contenttypes/management.py

    diff --git a/django/contrib/contenttypes/management.py b/django/contrib/contenttypes/management.py
    index 5c7e12a..9469644 100644
    a b def update_contenttypes(app, created_models, verbosity=2, **kwargs): 
    4444    # Confirm that the content type is stale before deletion.
    4545    if to_remove:
    4646        if kwargs.get('interactive', False):
    47             content_type_display = '\n'.join(['    %s | %s' % (ct.app_label, ct.model) for ct in content_types])
     47            content_type_display = '\n'.join([
     48                '    %s | %s' % (app_label, model)
     49                for (app_label, model) in content_types.items()
     50            ])
    4851            ok_to_delete = raw_input("""The following content types are stale and need to be deleted:
    4952
    5053%s
Back to Top