mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +00:00
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.
This commit is contained in:
committed by
Tim Graham
parent
97bb48d9ba
commit
a429a502ea
@@ -6,10 +6,10 @@ from .models import Event, Timestamp
|
||||
class EventAdmin(admin.ModelAdmin):
|
||||
list_display = ('dt',)
|
||||
|
||||
admin.site.register(Event, EventAdmin)
|
||||
|
||||
|
||||
class TimestampAdmin(admin.ModelAdmin):
|
||||
readonly_fields = ('created', 'updated')
|
||||
|
||||
admin.site.register(Timestamp, TimestampAdmin)
|
||||
site = admin.AdminSite(name='admin_tz')
|
||||
site.register(Event, EventAdmin)
|
||||
site.register(Timestamp, TimestampAdmin)
|
||||
|
||||
Reference in New Issue
Block a user