Exemple #1
0
 class Form(forms.Form):
     test = forms.ChoiceField(
         choices=[(1, "A")],
         widget=Select2(attrs={
             "data-placeholder": "Some placeholder",
         }),
         required=False)
 class Form(forms.Form):
     test = forms.ChoiceField(
         choices=[(1, "A")],
         widget=Select2(),
         required=False
     )
Exemple #3
0
 class Meta:
     model = Autocomplete_Light
     fields = ('text', )
     widgets = {'text': Select2(url='autocomplete-example')}