title: Django: invalid form
body: <p>I am new to Django and is currently trying to make a user registration form for my application. Does anyone know why <em>form.is_valid()</em> is returning False?</p>
  
  <p>forms.py</p>
  
  <pre><code>class RegistrationForm(forms.ModelForm):
      username = forms.CharField(widget=forms.TextInput)
      password = forms.CharField(widget=forms.PasswordInput)
      email = forms.CharField(widget=forms.EmailInput)
  
      class Meta:
          model = User
          fields = ['username', 'password', 'email']
  </code></pre>
  
  <p>views.py</p>
  
  <pre><code>def registration(request):
      if request.method == 'POST':
          form = RegistrationForm(request.POST)
          if form.is_valid():         
              print "valid"
              username = form.cleaned_data['username']
              email = form.cleaned_data['email']
              password = form.cleaned_data['password']
  
              User.objects.create_user(username=username, email=email, password=password)
  
              user = authenticate(username=username, passsword=password)
  
              if user is not None:
                  login(request, user)
                  return redirect('/admin')
  
          else:
              # return a blank form
              print "invalid"
              return render(request, 'registration/register.html', {'form': form})
  </code></pre>
  
  <p>register.html</p>
  
  <pre><code>&lt;div class="container "&gt;
  &lt;form method="post" action="."&gt;
      {% csrf_token %}
      &lt;h2 class="form-signin-heading"&gt;Register&lt;/h2&gt;
      &lt;input type="text" id="inputUsername" class="form-control" placeholder="Username" required autofocus&gt;
      &lt;input type="password" id="inputPassword" class="form-control" placeholder="Password" required&gt;
      &lt;input type="email" id="inputEmail" class="form-control" placeholder="Email" required autofocus&gt;
      &lt;button class="btn btn-lg btn-primary btn-block" type="submit"&gt;Sign in&lt;/button&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p></p>