can u plese send this code On Saturday, March 18, 2017 at 10:28:07 PM UTC+5:30, ايهاب توفيق wrote: > > I am tring to create drop down checkbox with values from database in my > templet using bootstrap select and form MultipleChoiceField like this > > > > Html > > select class="selectpicker" multiple> > > {% for topping in form.the_topping %} > > <option value="{{ topping }}">{{ topping.topping_id }}</option> > > > > {% endfor %} > > </select> > > > > <script type="text/javascript"> > > $(document).ready(function() { > > $('.selectpicker').selectpicker({ > > style: 'btn-info', > > size: 4 > > }); > > }); > > </script> > > Form.py > > *class *ProfileForm(forms.ModelForm): > the_topping = > forms.ModelMultipleChoiceField(queryset=Topping.objects.all(), > required=*False*, widget=forms.CheckboxSelectMultiple) > > *class *Meta: > model = Pizza > exclude = [*'user'*] > > > > the bootstrp working and the form is working but doesnot combined > > > > can any one help me PLS >
-- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/d70d5caf-fc66-45a1-9558-582c2f033c28%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.