python - How to have a multiple select field in django in the form of a drop down box -


Any help is greatly appreciated, I'm a newbie in the DJ.

  class studentRegister (forms.Form): courseList = forms.ModelMultipleChoiceField (queryset = course.officeSoul ())   

Thank you and appreciate your time , I just want to modify this type of form so that I can choose two or more options at one time and return it to the list?

I think you can use the SelectMultiple widget. class studentRegister (forms.Form): course list = forms.ModelMultipleChoiceField (queryset = course.objects.all), widget = form. Select multiple)

If it does not meet your needs, then you can try to use it.

Comments

Popular posts from this blog

How can I add a seperate action listener to all 14 of my buttons at once that can determine player turn?(java) -

php - Sorting an multidimension array using usort fails -

Simple file compression in C -