diff options
| author | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2023-07-07 08:06:01 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-07-07 08:06:01 +0200 |
| commit | f64fd47a7627ed6ffe2df2a32ded6ee528a784eb (patch) | |
| tree | 1abf1f8f945e9b72a72d31ec00f356e1088c4538 /tests/modeladmin | |
| parent | d569c1dcfeb26ca9ee391e5dfeadedf2b5ed4253 (diff) | |
Fixed #9602 -- Added AdminSite.get_model_admin().
This allows retrieving an admin class for the given model class without
using internal attributes.
Diffstat (limited to 'tests/modeladmin')
| -rw-r--r-- | tests/modeladmin/tests.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/modeladmin/tests.py b/tests/modeladmin/tests.py index 627029c9cf..f2763ecc0f 100644 --- a/tests/modeladmin/tests.py +++ b/tests/modeladmin/tests.py @@ -871,7 +871,7 @@ class ModelAdminTests(TestCase): username="bob", email="bob@test.com", password="test" ) self.site.register(Band, ModelAdmin) - ma = self.site._registry[Band] + ma = self.site.get_model_admin(Band) ( deletable_objects, model_count, @@ -898,7 +898,7 @@ class ModelAdminTests(TestCase): return False self.site.register(Band, TestModelAdmin) - ma = self.site._registry[Band] + ma = self.site.get_model_admin(Band) ( deletable_objects, model_count, |
