title: if form.is_valid() always false
body: <p>I'm learning Django 1.11 and I'm creating a form with <a href="https://github.com/kmike/django-widget-tweaks" rel="nofollow noreferrer"><strong>widget_tweaks</strong></a> tools.</p>
  
  <p>I have a variable "code" which is supposed to inform the template if the form is sent or not.
  If it's not sent, code = 1 and the form is displayed
  If the form is displayed, I just would like to display another form (not developed for now)</p>
  
  <p>The problem is, code is always = 1</p>
  
  <p>Why ?</p>
  
  <p>Many Thanks</p>
  
  <p>view.py</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>#-*- coding: utf-8 -*-
  from django.shortcuts import render
  from .forms import MinimumRegisterForm
  
  # Create your views here.
  def view_about(request):
   return render(request, 'about.html', locals())
  
  def view_first(request):
   return render(request, 'first.html', locals())
  
  def view_second(request):
   form = MinimumRegisterForm()
   if request.method == 'POST':
    form = MinimumRegisterForm(request.POST)
    if form.is_valid():
     identifiant = form.cleaned_data['identifiant']
     email = form.cleaned_data['email']
     password = form.cleaned_data['password']
     confirm_password = form.cleaned_data['confirm_password']
     code = "2"
   else:
    code = "1"
    return render(request, 'second.html', locals())
   return render(request, 'second.html', locals())</code></pre>
  </div>
  </div>
  </p>
  
  <p>Template html</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>          &lt;div class="inner cover"&gt;
              &lt;h1 class="cover-heading"&gt;Parlons un peu de vous ...&lt;/h1&gt;
              &lt;div class="MinimumRegisterForm"&gt;
                {% if form.errors %}
                  Les erreurs suivantes sont survenues:
                {{ form.errors }}
                {% endif %}
                {% if code == "1" %}
                  &lt;form action="{% url 'second' %}" action="POST"&gt;
                    {% csrf_token %}
                    &lt;p&gt;{{ form.identifiant|add_class:"form-control"|attr:"placeholder:Quel sera votre identifiant unique ?" }}&lt;/p&gt;
                    &lt;p&gt;{{ form.email|add_class:"form-control"|attr:"placeholder:Indiquez-y votre email !" }}&lt;/p&gt;
                    &lt;p&gt;{{ form.password|add_class:"form-control"|attr:"placeholder:Créer votre mot de passe ici." }}&lt;/p&gt;
                    &lt;p&gt;{{ form.confirm_password|add_class:"form-control"|attr:"placeholder:Retaper votre mot de passe." }}&lt;/p&gt;
                    &lt;input class="btn btn-lg btn-primary" type="submit" value="Continuer"&gt;
                  &lt;/form&gt;
                {% elif code == "2" %}
                   &lt;p&gt;Formulaire suivant&lt;/p&gt;
                {% endif %}
                {{ code }}              
              &lt;/div&gt;
            &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Forms.py</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>from django import forms
  
  class MinimumRegisterForm(forms.Form):
      identifiant = forms.CharField(
          max_length=50, 
          label="Choisissez un identifiant unique",
      )
      email = forms.EmailField(
          label="Votre adresse mail",
      )
      password = forms.CharField(
          widget=forms.PasswordInput, 
          label="Entrer un mot de passe",
      )
      confirm_password = forms.CharField(
          widget=forms.PasswordInput, 
          label="Confirmer votre mot de passe",
      )</code></pre>
  </div>
  </div>
  </p>