#25688: admin.register shouldn't allow an empty list of models to be registered ------------------------------------------------+------------------------ Reporter: bmispelon | Owner: nobody Type: Cleanup/optimization | Status: new Component: contrib.admin | Version: 1.8 Severity: Normal | Keywords: Triage Stage: Unreviewed | Has patch: 0 Needs documentation: 0 | Needs tests: 0 Patch needs improvement: 0 | Easy pickings: 1 UI/UX: 0 | ------------------------------------------------+------------------------ I couldn't remember how to do the model registering using the decorator syntax and ended up with this code:
{{{#!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. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/052.666d796333e6a42b77ca8f5c13997592%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.