s a contact form, validate s its input and send s an email
+ Render a contact form, validate its input and send an email
+ **Optional arguments:**
+ If ``True``, errors when sending the email will be silently
+ supressed (i.e., with no logging or reporting of any such
+ errors. Default value is ``False``.
+ The form to use. If not supplied, this will default to
+ ``contact_form.forms.ContactForm``. If supplied, the form
+ class must implement a method named ``save()`` which sends the
+ email from the form; the form class must accept an
+ ``HttpRequest`` as the keyword argument ``request`` to its
+ constructor, and it must implement a method named ``save()``
+ which sends the email and which accepts the keyword argument
+ The URL to redirect to after a successful submission. If not
+ supplied, this will be the URL ``/contact/sent/``.
+ The template to use for rendering the contact form. If not
- To specify the form class to use, pass the ``form_class`` keyword
- argument; if no ``form_class`` is specified, the base
- ``ContactForm`` class will be used.
- To specify the template to use for rendering the form (*not* the
- template used to render the email message sent from the form,
- which is handled by the form class), pass the ``template_name``
- keyword argument; if not supplied, this will default to
- To specify a URL to redirect to after a successfully-sent message,
- pass the ``success_url`` keyword argument; if not supplied, this
- will default to ``/contact/sent/``.
- To suppress exceptions raised during sending of the email, pass a
- ``True`` value for the ``fail_silently`` keyword argument. This is
- Passed in the ``template_name`` argument.
+ The value of the ``template_name`` keyword argument, or
if request.method == 'POST':
form = form_class(data=request.POST, files=request.FILES, request=request)