#24323: NameError: global name XXXXXAdmin is not defined when using admin register decorator with an __init__ super call -------------------------------+------------------------------------ Reporter: eskhool | Owner: nobody Type: Bug | Status: new Component: contrib.admin | Version: 1.7 Severity: Normal | Resolution: Keywords: | Triage Stage: Accepted Has patch: 0 | Needs documentation: 1 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 -------------------------------+------------------------------------ Changes (by charettes):
* needs_docs: 0 => 1 Comment: Because of the way model admin registration and class decoration works I doubt we'll be able to fix this in an elegant way. I suggest we document to use `site.register` if you have to reference your model admin during its initialization phase or simply use `super().__init__` on Python 3. -- Ticket URL: <https://code.djangoproject.com/ticket/24323#comment:2> 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/065.926515441be8ad2a541f53cb76fd37e7%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.