Opened 10 years ago

Last modified 9 years ago

#24323 closed Cleanup/optimization

NameError: global name XXXXXAdmin is not defined when using admin register decorator with an __init__ super call — at Initial Version

Reported by: Anshuman Aggarwal Owned by: nobody
Component: Documentation Version: 1.7
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

When registering a django admin using the

@admin.register(XXXX)
class XXXXAdmin(admin.ModelAdmin):
    def __init__(args, kwargs):
        super(XXXXAdmin, self).__init__(args, kwargs)

gives an exception:

NameError: global name XXXXXAdmin is not defined

Change History (0)

Note: See TracTickets for help on using tickets.
Back to Top