Django model form labels not working
<p>I'm using a model form in django 1.9 but label marks aren't generate while widget yes. Don't know why but something is going wrong.</p>

<p>Regards in advances,</p>

<p>This is py files:</p>

<p>model.py :</p>

<pre><code>class Account(models.Model):
     pseudo = models.CharField(_('pseudo'), max_length=100)
     password = models.CharField(_('password'), max_length=42)
     email = models.EmailField(_('email'), null=True)
     def __str__(self):
         return self.pseudo
</code></pre>

<p>form.py :</p>

<pre><code>class AccountForm(forms.ModelForm):
    class Meta:
        model = Account
        fields = ('pseudo', 'password', 'email')
        labels = {
            'pseudo': _('Pseudo'),
            'password': _('Password'),
            'email': _('Email'),
        }
        widgets = {
            'pseudo': forms.TextInput(attrs={
                'class': 'form-control',
            }),
            'password': forms.PasswordInput(attrs={
                'class': 'form-control',
            }),
            'email': forms.EmailInput(attrs={
                'class': 'form-control',
            }),
        }
</code></pre>

<p>view.py :</p>

<pre><code>def signup(request):
    AccountFormSet = AccountForm()
    if request.method == 'POST':
        if AccountFormSet.is_valid():
            AccountFormSet.save()
    return render(request, 'account/signup.html', {'formset': AccountFormSet})
</code></pre>

<p>signup.html :</p>

<pre><code>{% for form in formset %}
   &lt;div class="row"&gt;
      &lt;div class="form-group"&gt;
        {{ form }}
      &lt;/div&gt;
   &lt;/div&gt;
{% endfor %}
</code></pre>

<p>output is :</p>

<pre><code>&lt;input class="form-control" id="id_pseudo" maxlength="100" name="pseudo" type="text"&gt;
&lt;input class="form-control" id="id_password" maxlength="42" name="password" type="password"&gt;
&lt;input class="form-control" id="id_email" maxlength="254" name="email" type="email"&gt;
</code></pre>