diff options
| author | Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com> | 2015-03-30 18:33:26 +0200 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2015-04-15 09:45:26 -0400 |
| commit | a429a502ea0e8297deef82442d481fc9a8f6cd9d (patch) | |
| tree | 695a0ef067a5681dea414eb52de0d38dfa37228e /tests/admin_custom_urls/models.py | |
| parent | 97bb48d9ba864060d57a3137fb9c456b98ecc79b (diff) | |
Updated tests to stop leaking models in shared AdminSite.
This would break upcoming changes and AdminSite assumptions about
having an app_config for each application that has registered
models.
Diffstat (limited to 'tests/admin_custom_urls/models.py')
| -rw-r--r-- | tests/admin_custom_urls/models.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/admin_custom_urls/models.py b/tests/admin_custom_urls/models.py index 51725d4253..5a1b2f5c2e 100644 --- a/tests/admin_custom_urls/models.py +++ b/tests/admin_custom_urls/models.py @@ -77,6 +77,7 @@ class CarAdmin(admin.ModelAdmin): request, obj, post_url_continue=reverse('admin:admin_custom_urls_car_history', args=[obj.pk])) -admin.site.register(Action, ActionAdmin) -admin.site.register(Person, PersonAdmin) -admin.site.register(Car, CarAdmin) +site = admin.AdminSite(name='admin_custom_urls') +site.register(Action, ActionAdmin) +site.register(Person, PersonAdmin) +site.register(Car, CarAdmin) |
