I would like to hide all the \"Save\" buttons in Django\'s Admin\'s Change Form, for a specific model, when certain conditions are met. Therefore, I override the chang
If no one is against, then I publish my little hack.
This can be inserted anywhere and called up from the settings file (preferably at the very end).
# Hide "save_and_add_another" button
from django.contrib.admin.templatetags import admin_modify
submit_row = admin_modify.submit_row
def submit_row_custom(context):
ctx = submit_row(context)
ctx['show_save_and_add_another'] = False
return ctx
admin_modify.submit_row = submit_row_custom