Django

Code

Ticket #7244 (new)

Opened 2 months ago

Last modified 3 weeks ago

ModelChoicesField.__init__ and ModelMultipleChoicesField.__init__ must not pass a widget to the parent __init__.

Reported by: sebastian_noack Assigned to: adrian
Milestone: Component: django.newforms
Version: SVN Keywords:
Cc: Triage Stage: Unreviewed
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

Description (Last modified by ramiro)

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

0001-Fixed-widget-handling-in-ModelChoicesField.__init__.patch (2.5 kB) - added by sebastian_noack on 05/15/08 09:19:26.
0001-Fixed-widget-handling-in-ModelChoicesField.__init__.2.patch (2.2 kB) - added by sebastian_noack on 05/19/08 04:00:27.

Change History

05/15/08 09:19:26 changed by sebastian_noack

  • attachment 0001-Fixed-widget-handling-in-ModelChoicesField.__init__.patch added.

05/16/08 06:07:37 changed by sebastian_noack

  • cc set to adrian.
  • needs_better_patch changed.
  • needs_tests changed.
  • needs_docs changed.

05/16/08 06:15:19 changed by sebastian_noack

  • cc deleted.
  • owner changed from nobody to adrian.

05/19/08 04:00:27 changed by sebastian_noack

  • attachment 0001-Fixed-widget-handling-in-ModelChoicesField.__init__.2.patch added.

06/16/08 11:01:32 changed by ramiro

  • description changed.

Add/Change #7244 (ModelChoicesField.__init__ and ModelMultipleChoicesField.__init__ must not pass a widget to the parent __init__.)




Change Properties
Action