Ticket #5285: admin.patch

File admin.patch, 1.4 KB (added by anonymous, 17 years ago)
  • django/contrib/admin/templatetags/admin_modify.py

     
    4545        'show_delete_link': (not is_popup and context['has_delete_permission']
    4646                              and (change or context['show_delete'])),
    4747        'show_save_as_new': not is_popup and change and opts.admin.save_as,
    48         'show_save_and_add_another': not is_popup and (not opts.admin.save_as or context['add']),
     48        'show_save_and_add_another': not is_popup and context['has_add_permission'] and (not opts.admin.save_as or context['add']),
    4949        'show_save_and_continue': not is_popup and context['has_change_permission'],
    5050        'show_save': True
    5151    }
  • django/contrib/admin/views/auth.py

     
    3535        'change': False,
    3636        'has_delete_permission': False,
    3737        'has_change_permission': True,
    38         'has_file_field': False,
     38        'has_add_permission': True,
     39        'has_file_field': False,
    3940        'has_absolute_url': False,
    4041        'auto_populated_fields': (),
    4142        'bound_field_sets': (),
Back to Top