title: show custom django form error in template
body: <p>I am writing a view to send a password reset email to users. I am checking if the email entered by the user is registered by using the clean method in the forms.py, this is working correctly although I can not get the custom error message to display in the django template. </p>
  
  <p>views.py </p>
  
  <pre><code>def send_forgotten_password_email(request):
      heading = 'Reset Password'
      if request.method == 'POST':
  
          form = ForgottenPasswordForm(request.POST)
          if form.is_valid():
  
              email = form.cleaned_data['email']
  
      form = ForgottenPasswordForm()
  
      return render(request,'authentication/forms/forgotten_password.html',{
          'form':form,
          'heading':heading,
          })
  </code></pre>
  
  <p>forms.py </p>
  
  <pre><code>class ForgottenPasswordForm(forms.Form):
  
      email = forms.CharField(
          label='Email:',
          widget= forms.EmailInput(attrs={'class':'form-control','placeholder':'Enter email'})
          )
  
      def clean_email(self):
          email = self.cleaned_data['email']
          email = get_object_or_none(User,email=email)
          if not email:
              raise forms.ValidationError("Email not found.")
          return email
  </code></pre>
  
  <p>template </p>
  
  <pre><code>{% extends "base.html" %}
  {% load static %}
  
  {% block title %} Forgotten Password {% endblock title %}
  
  {% block content %}
  
  &lt;div class="row"&gt;
      &lt;div class="col col-sm-12 col-md-5 col-lg-5"&gt;
          &lt;div class="card"&gt;
            &lt;div class="card-body"&gt;
              &lt;h4 class="card-title"&gt;{{heading}}&lt;/h4&gt;
                  &lt;div class="alert alert-danger" role="alert"&gt;
                      {{form.non_field_errors}}
                      {{form.errors}}
                      {{forms.errors}}
                      {{form.email.errors}}
                  &lt;/div&gt;
                  &lt;form method="POST"&gt;
                      {% csrf_token %}
                    &lt;div class="form-group"&gt;
  
                      &lt;label&gt;{{form.email.label}}&lt;/label&gt;
                          {{form.email}}
                    &lt;/div&gt;
                   &lt;button type="submit" class="btn btn-primary"&gt;Submit&lt;/button&gt;
                  &lt;/form&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  
  
  
  
  {% endblock content %}
  </code></pre>