Skip to main content
spam protection.

Home-page: https://github.com/bitmazk/bitmazk-contact-form
Author: Tobias Lorenz
Author-email: tobias.lorenz@bitmazk.com
License: UNKNOWN
Description: bitmazk-contact-form
====================

A reusable contact form app for Django. Can be used with a modern user-friendly
spam protection or Google's reCAPTCHA. Ready for multilingual sites.

At the moment this contact form does not redirect to a success page. Instead
it adds a variable ``contact_form_success`` to the template context. The
developer can then just output some success message next to the form.

The project can be used in conjunction with `django-cms
<https://github.com/divio/django-cms>`_. Therefore the package comes with a
``cms_app.py`` file and can be integrated into your CMS pages via an AppHook.

Prerequisites
=============

- see requirements.txt

Installation
============

If you want to install the latest stable release from PyPi:

$ pip install bitmazk-contact-form

If you feel adventurous and want to install the latest commit from GitHub:

$ pip install -e git://github.com/bitmazk/bitmazk-contact-form#egg=contact_form

Add ``contact_form`` to your ``INSTALLED_APPS``::

INSTALLED_APPS = (
[...]
'contact_form',
}

Add ``CONTACT_FORM_RECIPIENTS`` to your ``settings.py``::

CONTACT_FORM_RECIPIENTS = (
('Foo Bar', 'foobar@example.com'),
)

Make sure to have a block called ``contact_form`` in your template::

{% block contact_form %}

If the output does not fit your needs, just override the templates provided by
this package.

With Django-CMS
---------------

Create a CMS page, assign it to the template that has the ``contact_form``
block and add the ``Contact Form AppHook`` to the page.

Simple spam protection
----------------------

Make sure you got a content block named ``extracss`` or add the relevant css sheet::

{{ form.media.css }}

reCAPTCHA
---------

First register at https://www.google.com/recaptcha/ and make sure you added all
the relevant URLs to your captcha.

Install ``django-recaptcha``:

pip install django-recaptcha

Add it to your installed apps.

Now add the following settings::

CONTACT_FORM_RECAPTCHA = True
RECAPTCHA_PUBLIC_KEY = 'YOUR_GOOGLE_RECAPTCHA_PUBLIC_KEY'
RECAPTCHA_PRIVATE_KEY = 'YOUR_GOOGLE_RECAPTCHA_PRIVATE_KEY'
NOCAPTCHA = True
RECAPTCHA_USE_SSL = True # We assume you are using https://

Configuration
=============

Set ``CONTACT_FORM_DISPLAY_CATEGORIES=True`` if you want the form to include a
list of categories the users request is about.

The categories are stored as master data and you can add them via the Django
admin under ``contact_form > ContactFormCategory``.

Keywords: contact form django reusable
Platform: UNKNOWN

Release files for bitmazk-contact-form 1.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bitmazk-contact-form 1.3.1
File Size Uploaded
bitmazk-contact-form-1.3.1.tar.gz 22.9 kB Details

Release files / bitmazk-contact-form-1.3.1.tar.gz

Download URL bitmazk-contact-form-1.3.1.tar.gz
Size 22.9 kB
Tags Source
SHA-256 checksum
How to use checksums
33debca0be9b9753b348989fcae6e994fff9e3f6cbcb4a0a3e92942f2edee7ed
BLAKE2b-256 checksum
How to use checksums
cc40e67cc1ec35c29e2b905c6855d46cc468950c6f8e2c343fa5944f4c487117
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

1.3.1 This release

1 release file

1.3

1 release file

1.2.1

1 release file

1.2

1 release file

1.1

1 release file

1.0

1 release file

0.3.2

1 release file

0.3.1

1 release file

0.3

1 release file

0.2.1

1 release file

0.2

1 release file

0.1.1

1 release file

0.1

1 release file

0.0.6

1 release file

0.0.5

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page