This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

A very simple contact form for a Django website. The form is emailed to one or more email addresses upon submission.

Requires

Django >= 1.4

Installation

Install the latest release using pip:

pip install quix.django.contact

Or install the development version using git:

git clone https://github.com/Quixotix/quix.django.contact.git

Add quix.django.contact to INSTALLED_APPS in settings.py.

Basic Usage

Specify the email addresses which will recieve the contact form message in settings.py:

CONTACT_EMAILS = ('somebody@localhost', 'another@localhost')

Include quix.django.contact.urls in urls.py:

urlpatterns = patterns('',
    # ...
    url(r'^contact/', include('quix.django.contact.urls')),
    # ...
)

Create the 3 templates (see examples in the next section):

  • contact/form.html - The contact form with form in the context.
  • contact/success.html - Page the form redirects to when successful.
  • contact/email.txt - The text template for the email.

Link to the contact form in a template using the "contact-form" named URL pattern:

<a href="{% url contact-form %}">Contact</a>

Templates

contact/form.html:

{% extends "base.html" %}
{% block content %}
  <h1>Contact</h1>
  <form action="." method="post">
    {% csrf_token %}
    {{ form.non_field_errors }}
    {{ form.as_p }}
    <input type="submit" value="Send" />
  </form>
{% endblock %}

contact/success.html:

{% extends "base.html" %}
{% block content %}
  <h1>Your message has been sent.</h1>
{% endblock %}

contact/email.txt:

From: {{ name }} {{ email }}

{{ message }}

---
This message was sent via the website contact form.

Settings

The following settings can be set in settings.py for the contact form. Only CONTACT_EMAILS is required, which is a tuple or list of email addresses to which the contact form should be sent.

Setting Default Required
CONTACT_EMAILS   Yes
CONTACT_FORM_CLASS "quix.django.contact.forms.ContactForm" No
CONTACT_FORM_TEMPLATE "contact/form.html" No
CONTACT_SUCCESS_TEMPLATE "contact/success.html" No
CONTACT_EMAIL_TEMPLATE "contact/email.txt" No
Release History

Release History

0.2.1

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
quix.django.contact-0.2.1.tar.gz (8.1 kB) Copy SHA256 Checksum SHA256 Source Nov 21, 2012

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting