Skip to main content

A very simple Contact Form for django

Project description

indeed_contactForm will store messages sent with it in your database,
make them avaliable in the admin interface and send you an email with
the messages content.
For this to work you need to configure your django project to be able to
send emails.


simply use indeed_contactForm in a view like this:


from indeed_contactForm.views import contact as contactForm

def contact(request):
return contactForm(request, 'contact.html')

if you need to make some variables in the template avaliable, you can
simply pass contact() a dict like you would pass it to render_to_response.

def contact(request):
return contactForm(request, 'contact.html', {'myVar':42})


contact.html can contain a normal form, for example:

{% extends "whatever/base.html" %}

{% block content %}
{% if form.errors %}
<p style="color: red;">
Please correct the error{{ form.errors|pluralize }} below.
</p>
{% endif %}

<form action="" method="post">{% csrf_token %}
<table>
{{ form.as_table }}
</table>
<input type="submit" value="Absenden">
</form>
{% endblock %}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

indeed_contactForm-1.0.2.tar.gz (3.2 kB view details)

Uploaded Source

File details

Details for the file indeed_contactForm-1.0.2.tar.gz.

File metadata

File hashes

Hashes for indeed_contactForm-1.0.2.tar.gz
Algorithm Hash digest
SHA256 22b709ea49b24ca046a3f90324fc05f0526f566f25be7937fec5ba9dd6016480
MD5 4e4508599bee6fae93e0511654a3f33f
BLAKE2b-256 94a036000551d7c1088503a260ecfbfd3a9e4eccb610cd6b92fb54c92c05764b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page