actly as you did: remove the empty_label keyword argument from the super call.
From: Odile Lambert [mailto:pisc...@laposte.net]
Sent: Thursday, March 14, 2019 2:10 AM
To: django-users@googlegroups.com; Matthew Pava
Subject: Re: Bug in Django 2.1 on ModelMultipleChoiceField
Hello
If this is by d
Hello
If this is by design Django should raise an error indicating that
ModelMultipleChoiceField does not allow an empty_label attribute
The present error message in the __init__ of the super_class is
not coherent and very difficult to understand for beginners.
Looking at it, I would say that this is by design. You shouldn’t use an empty
label on a multiple choice field. Perhaps this should be clarified in the docs.
Saying that, if you really want an empty label on a multiple choice field, you
could create your own class that initializes empty_label
3 matches
Mail list logo