Contact form plugin for Django CMS with spam protection and i18n.
The message entered by the web user is turned into an email which is sent to the email address configured for the specific plugin instance.
If you decide to use the ReCAPTCHA spam protection method you need to install the python library recaptcha-client (package python-recaptcha in Debian).
If you use Akismet for spam protection akismet is needed. You also need to set your domain url in django admin in the section "sites".
For Python version <2.7, importlib has to be installed since importlib is in the standard library in Python 2.7, but is a third-party package for older versions.
All libraries can be installed by pip or easy_install.
It is recommended but not required to use South. Again it can be easily installed by pip or easy_install.
You can simply type into a terminal pip install cmsplugin-contact or easy_install cmsplugin-contact.
The email address that is used to send the message is picked up from DEFAULT_FROM_EMAIL Django setting. Additionally, the Reply-To: header is set to the user-supplied email address.
Sending the message using the user-supplied address to set From: header of the email is currently not supported. This is because many servers will reject emails that use From: addresses not registered with that server. Some servers may also strip the Reply-To: header. For this, the user-supplied email address is also added to the body of the message.
If you don't want to enter the ReCATPCHA keys in the admin interface you can provide them through these settings.
The same as for ReCAPTCHA goes fo Akismet.
( ('cmsplugin_contact.forms.ContactForm', _('default')), )
You can use your custom ContactForm, just add a new tuple with the class path and name pretty name to show for your user.
If you want to steal using the default ContactForm, do like this in your settings:
( ('cmsplugin_contact.forms.ContactForm', _('default')), ('my_app.forms.MyContactForm', _('My form')), )
In your custom form, you can set what template you want to use, like this:
class MyContactForm(Form): ... template = 'path/to/my_contact_template.html'
The default editor is WYMEditor like in Django CMS. The plugin respects the USE_TINYMCE setting of Django CMS. Please see Django CMS docs for more information on how to use TinyMCE. If you have the package 'djangocms_text_ckeditor' in your INSTALLES_APPS CKEditor is used.
See examples/cmsplugin_custom_contact how to subclass cmsplugin_contact and add custom fields into it. You can override properties of the subclassed ContactPlugin and use your own templates and classes.
After the contact email has been sent a signal is fired. You can use it like this:
from django.dispatch import receiver from cmsplugin_contact.cms_plugins import email_sent @receiver(email_sent) def handle_signal(sender, **kwargs): print kwargs['data']
|File||Type||Python Version||Uploaded On||Downloads|
|cmsplugin_contact-1.1.1-py2.7.egg||Egg||2.7||March 30, 2015||1,134|
|1.1.1||March 30, 2015|
|1.1.0||Sept. 24, 2014|
|1.0.0||Jan. 12, 2012|
|0.9.8||July 22, 2011|
|0.9.7||July 22, 2011|
|0.9.6||June 25, 2011|
|0.9.5||May 15, 2011|
|0.9.4||May 15, 2011|
|0.9.3||Jan. 14, 2011|
|0.9.2||Oct. 29, 2010|
|0.9.1||Sept. 6, 2010|
|0.9||Sept. 2, 2010|
|Aug. 24, 2015, 10:47 p.m.||cmsplugin-contact||0.9||Release Created|
|Aug. 24, 2015, 10:47 p.m.||cmsplugin-contact||0.9.4||Release Created|
|Aug. 24, 2015, 10:47 p.m.||cmsplugin-contact||0.9.1||Release Created|
|Aug. 24, 2015, 10:47 p.m.||cmsplugin-contact||0.9.8||Release Created|
|Aug. 24, 2015, 10:47 p.m.||cmsplugin-contact||0.9.7||Release Created|
|Aug. 24, 2015, 10:47 p.m.||cmsplugin-contact||0.9.6||Release Created|
|Aug. 24, 2015, 10:47 p.m.||cmsplugin-contact||0.9.5||Release Created|
|Aug. 24, 2015, 10:47 p.m.||cmsplugin-contact||1.0.0||Release Created|
|Aug. 24, 2015, 10:47 p.m.||cmsplugin-contact||0.9.3||Release Created|
|Aug. 24, 2015, 10:47 p.m.||cmsplugin-contact||0.9.2||Release Created|
|Aug. 24, 2015, 10:47 p.m.||cmsplugin-contact||1.1.0||Release Created|
|Aug. 24, 2015, 10:47 p.m.||cmsplugin-contact||1.1.1||Release Created|
|Aug. 24, 2015, 10:47 p.m.||cmsplugin-contact||Package Created|