Django

Code

Ticket #3817: admin_modify.diff

File admin_modify.diff, 0.8 kB (added by Simon G. <dev@simon.net.nz>, 2 years ago)

Patch implementing reza@zeerak.ir's suggested fix.

  • django/contrib/admin/templatetags/admin_modify.py

    old new  
    4444        'show_delete_link': (not is_popup and context['has_delete_permission'] 
    4545                              and (change or context['show_delete'])), 
    4646        'show_save_as_new': not is_popup and change and opts.admin.save_as, 
    47         'show_save_and_add_another': not is_popup and (not opts.admin.save_as or context['add'])
     47        'show_save_and_add_another': not is_popup and (not opts.admin.save_as or context['add']) and context['has_add_permission']
    4848        'show_save_and_continue': not is_popup and context['has_change_permission'], 
    4949        'show_save': True 
    5050    }