Answer the question
In order to leave comments, you need to log in
Why is the property not defined via widget?
Good afternoon.
Why is the attribute not added to the select field in this implementation:
class VendorRegForm(forms.ModelForm):
class Meta:
model = VendorProfile
fields = ('org_name','slug', 'kind_activity')
....
kind_activity = forms.ModelChoiceField(queryset = Activity.objects.all(),
widget=forms.Select(attrs={'class': 'form-control'}))
Answer the question
In order to leave comments, you need to log in
for modal forms, the widget is redefined differently:
djbook.ru/rel1.8/topics/forms/modelforms.html#over...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question