About the Saving Buttons at the Top for All Models in Administration

Monkey-patch the ModelAdmin to set save_on_top to True by default:

1
2
3
4
5
6
7
8
9
# myproject/apps/core/apps.py
from django.apps import AppConfig

class CoreConfig(AppConfig):
    name = "myproject.apps.core"

    def ready(self):
        from django.contrib.admin import ModelAdmin
        ModelAdmin.save_on_top = True

Also make sure to add the "myproject.apps.core" to the INSTALLED_APPS in the settings.

Tips and Tricks Programming Development Django 5.x Django 4.2 Django 3.2