#33805: SelectMultiple in ModelAdminForm  help_text render
-------------------------------------+-------------------------------------
               Reporter:  Maxim      |          Owner:  nobody
  Danilov                            |
                   Type:  Bug        |         Status:  new
              Component:             |        Version:  4.1
  contrib.admin                      |       Keywords:  modeladmin,
               Severity:  Normal     |  AdminForm
           Triage Stage:             |      Has patch:  0
  Unreviewed                         |
    Needs documentation:  0          |    Needs tests:  0
Patch needs improvement:  0          |  Easy pickings:  1
                  UI/UX:  0          |
-------------------------------------+-------------------------------------
 In AdminForm Help text on render for SelectMultiple widget don't check, if
 widget.allow_multiple_selected = False.

 Widget himself on render checks it

 {{{
 # django.forms.widgets rows 684-685
 if self.allow_multiple_selected:
    context['widget']['attrs']['multiple'] = True
 }}}

 But help_text for widget, whose is rendered behind widget - don't checks
 it. There we check only "isinstance"

 {{{
 #  django.contrib.admin.options.py rows 280-281
 if (isinstance(form_field.widget, SelectMultiple) ann not
 isinstance(form_field.widget, (CheckboxSelectMultiple,
 AutocompleteSelectMultiple))):
     ... # do some stuff with help text
 }}}

 as a result I get "msg", which should not be.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/33805>
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/0107018194c3ffb5-ac56a295-744b-4060-8049-1887dfe31994-000000%40eu-central-1.amazonses.com.

Reply via email to