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:
# 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
Also by me
Django Paddle Subscriptions app
For Django-based SaaS projects.
Django GDPR Cookie Consent app
For Django websites that use cookies.