#32341: forms.ModelMultipleChoiceField raising TypeError when empty_label 
provided
-------------------------------------+-------------------------------------
     Reporter:  thewamz              |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  Forms                |                  Version:  3.1
     Severity:  Release blocker      |               Resolution:
     Keywords:                       |             Triage Stage:
  ModelMultipleChoiceField           |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  1
-------------------------------------+-------------------------------------
Description changed by thewamz:

Old description:

> In a django form, when I set a value for the `empty_label` parameter, a
> TypeError is raised. TypeError: __init__() got multiple values for
> keyword argument 'empty_label'
>
> ```
> field_name = forms.ModelMultipleChoiceField(
>         label="Field Label",
>         queryset=MyModel.objects.all(),
>         empty_label="Select something",
>     )
> ```

New description:

 In a django form, when I set a value for the `empty_label` parameter, a
 TypeError is raised. TypeError: __init__() got multiple values for keyword
 argument 'empty_label'

 `field_name =
 forms.ModelMultipleChoiceField(queryset=MyModel.objects.all(),
 empty_label="Select something" )`

--

-- 
Ticket URL: <https://code.djangoproject.com/ticket/32341#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.63f16aacaf6493bacf0c7223617dbf52%40djangoproject.com.

Reply via email to