django-contact-form / docs / views.txt

Full commit
Included views

One view is included with this application:
``contact_form.views.contact_form``, which knows how to work with
``contact_form.forms.ContactForm`` and its subclasses, and takes
several useful keyword arguments for specifying behavior.


Render a contact form, validate its input and send an email from it.

**Optional arguments:**

    A dictionary of variables to add to the template context. Any
    callable object in this dictionary will be called to produce the
    end result which appears in the context.

    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 ``fail_silently``.

    The URL to redirect to after a successful submission. If not
    supplied, this will be the URL pointed to by the named URL pattern

    The template to use for rendering the contact form. If not
    supplied, defaults to :template:`contact_form/contact_form.html`.


    The form instance.

The value of the ``template_name`` keyword argument, or