title: Django forms not working
body: <p>Hi I have a simple django form, which enables the users to signup to the website. but am confused how can I submit my form fields. Am new to Django. Please help me on it. Thanks in advance. </p>
  
  <p>Forms.py:</p>
  
  <pre><code>from django import forms
  from django import forms
  from django.contrib.auth.models import User   # fill in custom user info then save it
  # from django.contrib.auth.forms import UserCreationForm
  
  
  class UserForm(forms.Form):
      email = forms.EmailField(max_length=100, null=True, blank=False)
      first_name = forms.CharField(max_length=20)
      password = forms.CharField(max_length=20, required=True, label="password", widget=forms.PasswordInput)
      last_name = forms.CharField(max_length=20)
      date_joined = forms.DateTimeField(auto_now_add=True, auto_now=False)
      date_ = forms.DateTimeField(auto_now_add=False, auto_now=True)
  </code></pre>
  
  <p>Views.py</p>
  
  <pre><code>def register_user(request):
      if request.method == 'POST':
          print "Saisisis"
          form = UserForm(request.POST)     # create form object
          if form.is_valid():
              form.save()
              return HttpResponseRedirect('/accounts/register_success')
      print "blah"
      args = {}
      args.update(csrf(request))
      args['form'] = UserForm()
      # import pdb
      # pdb.set_trace()
      print args
      return render(request, 'pages/signup.html', args)
  </code></pre>
  
  <p>and my html:</p>
  
  <pre><code>{% extends 'pages/base.html' %}
  {% block additional_styles %}
  &lt;style&gt;
      body{
      background:url(static/img/nose.jpg) no-repeat center center fixed;
      -webkit-background-size: cover
      -moz-background-size: cover;
      -o-background-size: cover;
      background-size: cover;
      }
  &lt;/style&gt;
  {% endblock %}
  
  {% block contentblock %}
  &lt;div class="container well"&gt;
  
      &lt;h1&gt; Please Sign Up fellas&lt;/h1&gt;
  
      &lt;form method="POST" action="login.html"&gt;
          {% csrf_token %}
          {{ form.as_table }}
  
          &lt;input type="submit" value="OK"&gt;
  
      &lt;/form&gt;
  &lt;/div&gt;
  
  {% endblock %}
  </code></pre>