Had some thoughts after seeing: Modernization of the Django admin · Issue #70 · django/new-features · GitHub
Is there an easy path to define an interface within the admin code?
The biggest advantage of the admin from the DX perspective is the ease of registering apps, defining read-only/autocomplete/display fields and overriding default behaviour with appropriate functions & filters. All of this automagically handles all the UI for us. The high-level API is the most interesting part for most use cases.
If logic can be distangled and punted off into an overridable setting, it might be easier to update or use a drop-in replacement.
I was thinking something similar to the setting for ID field
DEFAULT_MODEL_ADMIN = “django.contrib.admin.ModelAdmin“
Why
- Makes testing different versions of ModelAdmin with different parameters easier
- Drop-in replacement for third-party dashboard packages with custom ModelAdmins
- If the team chooses to rewrite the admin (which is rather unlikely) to avoid grokking with the existing code, which I often seen described as “really difficult because of the rather ancient code that’s supporting it.”, the process can incrementally happen in-tree with an “ExperimentalModelAdmin” until it becomes stable over the long term. That reduces the risk of it being abandoned like django-admin2