http://docs.djangoproject.com/en/dev/ref/forms/widgets/#django.forms.Select
Here, it says I can do SELECT widgets. But how do I do that? It doesn\'t show any example on
Django 2.0
Options = [
('1', 'Hello'),
('2', 'World'),
]
category = forms.ChoiceField(label='Category', widget=forms.Select, choices=sample)
BTW tuple also works as same as list.
Options = (
('1', 'Hello'),
('2', 'World'),
)
category = forms.ChoiceField(label='Category', widget=forms.Select, choices=sample)