#33857: using FilteredSelectMultiple widget on forms.ModelMultipleChoiceField is
not working
-------------------------------------+-------------------------------------
     Reporter:  SebaRGFSL            |                    Owner:  nobody
         Type:  Bug                  |                   Status:  closed
    Component:  Forms                |                  Version:  2.2
     Severity:  Normal               |               Resolution:  invalid
     Keywords:  forms, widgets,      |             Triage Stage:
  ManytoMany,                        |  Unreviewed
  ModelMultipleChoiceField           |
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

 * status:  new => closed
 * resolution:   => invalid


Comment:

 It works for me in the admin, so it's probably an issue in your code. I
 used the following form:
 {{{
 class MyBrushForm(forms.ModelForm):
     dental_codes = forms.ModelMultipleChoiceField(
         label='Select Proccedure Codes',
         queryset = DentalCode.objects.all(),
         widget = FilteredSelectMultiple('Dental Codes Selection',
 is_stacked=True),
         required = False,
     )
     code = forms.IntegerField()

     class Meta:
         model = Brush
         fields = ['code', 'dental_codes']


 class BrushAdmin(admin.ModelAdmin):
     form = MyBrushForm
 }}}

 Moreover Django 2.2 is not supported anymore, you can try to use Django
 4.0+.

 See TicketClosingReasons/UseSupportChannels for ways to get help.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/33857#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/01070182128ed805-110b51ed-d07f-4f8c-a8a8-873726e693d6-000000%40eu-central-1.amazonses.com.

Reply via email to