diff options
| author | Becky Smith <rebkwok@gmail.com> | 2017-03-30 10:13:15 +0100 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2018-02-24 20:41:43 -0500 |
| commit | 8116e588dbdd17171a322da589b691bdf01f7041 (patch) | |
| tree | c46f319b831339ec9ee665e850f89bc3f3a169e0 /tests/admin_views/customadmin.py | |
| parent | 9822d88ca0dd855a668f9c33447aeac45a9768ac (diff) | |
Fixed #17962 -- Added ModelAdmin.get_deleted_objects().
Diffstat (limited to 'tests/admin_views/customadmin.py')
| -rw-r--r-- | tests/admin_views/customadmin.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/admin_views/customadmin.py b/tests/admin_views/customadmin.py index 5ee8c0c159..9331918b37 100644 --- a/tests/admin_views/customadmin.py +++ b/tests/admin_views/customadmin.py @@ -46,9 +46,15 @@ class CustomPwdTemplateUserAdmin(UserAdmin): change_user_password_template = ['admin/auth/user/change_password.html'] # a list, to test fix for #18697 +class BookAdmin(admin.ModelAdmin): + def get_deleted_objects(self, objs, request): + return ['a deletable object'], {'books': 1}, set(), [] + + site = Admin2(name="admin2") site.register(models.Article, base_admin.ArticleAdmin) +site.register(models.Book, BookAdmin) site.register(models.Section, inlines=[base_admin.ArticleInline], search_fields=['name']) site.register(models.Thing, base_admin.ThingAdmin) site.register(models.Fabric, base_admin.FabricAdmin) |
