Opened 16 years ago
Closed 16 years ago
#7617 closed (fixed)
ModelFormMetaclass.__new__ is incompatible with metaclass mixins
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | Forms | Version: | newforms-admin |
Severity: | Keywords: | ||
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
I wanted to define a subclass of ModelFormMetaclass that also inherits from a mixin. Because new has an additional parameter formfield_callback, the call of the mixin's new fails.
In addition, ModelFormMetaclass.new doesn't use super(...).new in all cases.
I'll attach a patch fixing this.
Attachments (1)
Change History (4)
by , 16 years ago
Attachment: | models.diff added |
---|
comment:1 by , 16 years ago
comment:2 by , 16 years ago
Has patch: | set |
---|---|
Triage Stage: | Unreviewed → Accepted |
Version: | SVN → newforms-admin |
Most of this patch was for trunk (and that went into [7847]), but there's a portion just at the end that patches from formclass stuff. That is newforms-admin territory, so moving to that branch for them to handle (and close when it's done). Basically, the call to ModelFormMetaclass.__new__()
has to change slightly.
comment:3 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
patch for newforms/models.py