#7244 closed (fixed)
ModelChoicesField.__init__ and ModelMultipleChoicesField.__init__ must not pass a widget to the parent __init__.
Reported by: | Sebastian Noack | Owned by: | Adrian Holovaty |
---|---|---|---|
Component: | Forms | Version: | dev |
Severity: | Keywords: | aug22sprint | |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description (last modified by )
There is a bug in the ModelChoicesField and ModelMultipleChoicesField from django.newforms.models, which passed Select or MultipleSelect as default widget to the parent __init__
if not specified. This breaks the ability to set the widget class attribute in derived classes. I wrote a patch, that fixes this.
Attachments (3)
Change History (11)
by , 17 years ago
Attachment: | 0001-Fixed-widget-handling-in-ModelChoicesField.__init__.patch added |
---|
comment:1 by , 17 years ago
Cc: | added |
---|
comment:2 by , 17 years ago
Cc: | removed |
---|---|
Owner: | changed from | to
by , 17 years ago
Attachment: | 0001-Fixed-widget-handling-in-ModelChoicesField.__init__.2.patch added |
---|
comment:3 by , 17 years ago
comment:4 by , 17 years ago
Description: | modified (diff) |
---|
comment:5 by , 16 years ago
milestone: | → 1.0 |
---|---|
Triage Stage: | Unreviewed → Accepted |
by , 16 years ago
Attachment: | 7244.patch added |
---|
comment:6 by , 16 years ago
Keywords: | aug22sprint added |
---|
FilePathField did the same thing - updated patch, fields still work, tests still pass
comment:7 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
See http://groups.google.com/group/django-developers/browse_thread/thread/7f0459b0774f9770