Closed andreccorrea closed 3 years ago
Nevermind. Just figured it out. I had to use it in the form this way.
class MercadoriaFiltroIndexForm(forms.Form):
busca = forms.ChoiceField(
widget=autocomplete.Select2(
url='/estoque/retornar_mercadorias/',
attrs={
'data-placeholder': 'Selecione uma mercadoria',
'data-minimum-input-length': 2,
'data-theme': 'bootstrap4',
})
)
Hi,
I'm trying to use DAL in a ListView, with a formMixin, with a form that doesn't have a model, but it doesn't work. It doesn't render the widget as a Select2.