Q:

ModelChoiceField widget attrs have no effect

I have this model form that I have to render manually but the ModelChoiceField attributes don't have any effect. 
class ExtendedUserForm(forms.ModelForm):
    favourite_provider = forms.ModelChoiceField(queryset=Provider.objects.all())

    class Meta:
        EXPERTISE_CHOICES = (
            ('N', 'Novice'),
            ('B', 'Beginner'),
            ('I', 'Intermediate'),
            ('E', 'Expert'),
        )

        model = ExtendedUser
        labels = {
            'expertise': 'Expertise',
            'favourite_provider': 'Favourite provider',
            'job_title': 'Job title',
            'job_place': 'Company/Institution',
        }

        widgets = {
            'expertise': forms.Select(choices=EXPERTISE_CHOICES, attrs={'class': 'form-control'}),
            'favourite_provider': forms.Select(attrs={'class': 'form-control'}),
            'job_title': forms.TextInput(attrs={'placeholder': 'Your job title', 'class': 'form-control'}),
            'job_place': forms.TextInput(attrs={'placeholder': 'Your company/institution', 'class': 'form-control'}),
        }
        exclude = ['user', 'history', 'favourite_services']

The rendered HTML is as follow:
<div class="form-group">
    <label><label for="id_expertise">Expertise:</label></label>
    <select name="expertise" required id="id_expertise" class="form-control">
      <option value="" selected>---------</option>
      <option value="N">Novice</option> 
      <option value="B">Beginner</option>
      <option value="C">Competent</option>
      <option value="P">Proficient</option>
      <option value="E">Expert</option>
    </select>
  </div>

 <div class="form-group">
 <label><label for="id_favourite_provider">Favourite provider:</label></label>
 <select name="favourite_provider" required id="id_favourite_provider">
      <option value="" selected>---------</option>
      <option value="1">AWS</option>
    </select>

As you can see the second select doesn't have the class attribute despite that I precised that here 'favourite_provider': forms.Select(attrs={'class': 'form-control'}). How to fix that ?

A:

Django documentation quote (from the note):  

Fields defined declaratively are left as-is, therefore any
  customizations made to Meta attributes such as widgets, labels,
  help_texts, or error_messages are ignored; these only apply to fields
  that are generated automatically.  

To get what you want you should fill widget parameter of ModelChoiceField explicitly:  
favourite_provider = forms.ModelChoiceField(queryset=Provider.objects.all(), widget=forms.Select(attrs={'class': 'form-control'}))

