Hello, I believe Bugs in Django are to be reported in this user list.
Below is a report for a bug which does not seem to be already
filed. In the documentation reference on the ModelMultipleChoiceField
there is no restrictios mentioned on the empty_label attribute. Whenever you declare an attribute empy_label for a
ModelMultipleChoiceField, it generates an error during the
system_checks typeError " __init__() got multiple values for keyword argument 'empty_label To reproduce the bug : : class MyForm(forms.Form): Another user on stackoverflow encountered this same problem see
here :
https://stackoverflow.com/questions/52263426/django-empty-label-for-modelmultiplechoicefield-multiple-values-for-keyword-arg
The cause of the error is the following : the code ( see fdjango/forms/models.py line 1266 sets the empty_label attribute to None while calling the super_class (ModelChoiceField): super().__init__(queryset, empty_label=None, **kwargs) while the super_class.__init__ sets the empy_label to
"---------". removing the empty_label= None in the call to the super_class
solved the problem for me. best regards Odile Lambert -- |
Bug in Django 2.1 on ModelMultipleChoiceField
'Odile Lambert' via Django users Wed, 13 Mar 2019 11:58:10 -0700
- Bug in Django 2.1 on ModelMultipleChoiceF... 'Odile Lambert' via Django users
- RE: Bug in Django 2.1 on ModelMultip... Matthew Pava
- Re: Bug in Django 2.1 on ModelMu... 'Odile Lambert' via Django users
- RE: Bug in Django 2.1 on Mod... Matthew Pava