{{{#!python
@admin.register()
class MyModelAdmin(admin.ModelAdmin):
pass
}}}
This code doesn't actually do anything, but it does so silently. I think
`register` should complain when you give it no actual model to register.
--
Ticket URL: <https://code.djangoproject.com/ticket/25688>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* stage: Unreviewed => Accepted
--
Ticket URL: <https://code.djangoproject.com/ticket/25688#comment:1>
* owner: nobody => hramezani
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/25688#comment:2>
* has_patch: 0 => 1
Comment:
[https://github.com/django/django/pull/5563 Pull Request]
--
Ticket URL: <https://code.djangoproject.com/ticket/25688#comment:3>
* version: 1.8 => master
* needs_tests: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/25688#comment:4>
* Attachment "empty_list_fails_to_register.diff" added.
Adds a test and applies requested fixes to comments.
* cc: aaronelliotross@… (added)
* needs_tests: 1 => 0
--
Ticket URL: <https://code.djangoproject.com/ticket/25688#comment:5>
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/25688#comment:6>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"8c553e7d3fd3f598a445f3c35711829e9b3645a4" 8c553e7d]:
{{{
#!CommitTicketReference repository=""
revision="8c553e7d3fd3f598a445f3c35711829e9b3645a4"
Fixed #25688 -- Made admin.register() disallow an empty list of models.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/25688#comment:7>