django-crispy-forms / django-crispy-forms/crispy-tailwind

Dropdown Empty

Open
#108 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
HTML
Stars
423
Forks
64
PR merge metrics
No merged PRs in 30d

Description

Hello,

I'am using this form class to populate an dropdown list. My problem the dropdown is empty

class LeadModelForm(forms.ModelForm):
class Meta:
model = InstaProfile
fields = fields = '__all__'
choices = Category.objects.all().values_list('name','name')
choice_list = []

for item in choices:
choice_list.append(item)

widgets ={

'category': forms.Select(choices=choice_list,attrs={'class': 'form-select'}),

}

If a i remove the crispy filter on my html template file is working

Any idea ?

Thank you

Greg

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.