title: Django form does not work or CSRF_token aborted
body: <p>Hello I am making Django App. I have a problem with my login form. Whenever I want to login,
  form does not do anything or it throws csrf token error.
  Views:</p>
  <pre><code>def loginView(request):
      if request.method == 'POST':
          form = AuthenticationForm(request.POST)
          if form.is_valid():
              form.save()
              username = form.cleaned_data.get('username')
              messages.success(request, f&quot;You successfully logged in {username}&quot;)
              return redirect('home-page')
      else:
          form = AuthenticationForm()
      return render(request, 'shop/login.html', {'form': form})
  </code></pre>
  <p>HTML TEMPLATE:</p>
  <pre><code>{% extends 'shop/base.html' %}
  
  {% block content %}
  &lt;div class = &quot;form-container&quot;&gt; 
      &lt;form class=&quot;form&quot; method=&quot;POST&quot;&gt;{% csrf_token %}
          &lt;label for=&quot;username&quot;&gt;Email:&lt;/label&gt;
          {{form.username}}
          &lt;label for=&quot;password&quot;&gt;Passoword:&lt;/label&gt;
          {{form.password}}
          &lt;button type=&quot;submit&quot;&gt;Login&lt;/button&gt;
      &lt;/form&gt;
  &lt;/div&gt;
  {% endblock content %}
  </code></pre>