Opened 17 years ago

Closed 17 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:

Description

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

Example:

    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 by Robert Myers <myer0052@…>, 17 years ago

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

comment:2 by Robert Myers <myer0052@…>, 17 years ago

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