Opened 11 years ago
Last modified 10 years ago
#24323 closed Cleanup/optimization
NameError: global name XXXXXAdmin is not defined when using admin register decorator with an __init__ super call — at Version 1
| 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 (last modified by )
When registering a django admin using the
@admin.register(XXXX)
class XXXXAdmin(admin.ModelAdmin):
def __init__(self, *args, **kwargs):
super(XXXXAdmin, self).__init__(*args, **kwargs)
gives an exception:
NameError: global name XXXXXAdmin is not defined
Change History (1)
comment:1 by , 11 years ago
| Description: | modified (diff) |
|---|---|
| Triage Stage: | Unreviewed → Accepted |
Note:
See TracTickets
for help on using tickets.