Opened 12 years ago

Closed 12 years ago

#3219 closed defect (wontfix)

Invalid admin attribute should not cause a metaclass error

Reported by: Robert Myers <myer0052@…> Owned by: Adrian Holovaty
Component: Core (Other) Version:
Severity: normal Keywords:
Cc: myer0052@… Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


When a invalid admin attribute is used a metaclass error is raised.


    class BadAdminOption(models.Model):
        name = models.CharField(maxlength=30)
        class Admin:
            nonexistent = 'option'

Expecting Error::

    "admin" attribute, if given, must be set to a models.AdminOptions() instance.

Actual Error::

    Error when calling the metaclass bases
    __init__() got an unexpected keyword argument 'nonexistent'

Change History (2)

comment:1 Changed 12 years ago by Robert Myers <myer0052@…>

Should be closed as wontfix since the newadmin will not be using AdminOptions() any more.

comment:2 Changed 12 years ago by Robert Myers <myer0052@…>

Resolution: wontfix
Status: newclosed

Since this is about to change there is no need to fix this ticket, the newforms-admin branch will correct this error.

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