Remove obsolete AdminSite.get_model_admin.

Review Request #14813 — Created Feb. 11, 2026 and updated

Information

Review Board
master

Reviewers

Our AdminSite subclass had a get_model_admin method, which returned
the admin class for a given model. As of Django 5.0, they have a nearly
identical method, named the same, except instead of returning None, it
raises an exception. Their own code calls this method and was crashing
on the None, so we can just remove our own implementation of it.

Ran unit tests.

Summary ID
Remove obsolete AdminSite.get_model_admin.
Our AdminSite subclass had a `get_model_admin` method, which returned the admin class for a given model. As of Django 5.0, they have a nearly identical method, named the same, except instead of returning `None`, it raises an exception. Their own code calls this method and was crashing on the `None`, so we can just remove our own implementation of it. Testing Done: Ran unit tests.
qotmpxxvkmuswwkkvlxywwnmyxpurlvz
Checks run (2 succeeded)
flake8 passed.
JSHint passed.