Package: cmsplugin-contact
Contact form plugin forDjango CMSwith 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.Spam protection is provided by eitherReCAPTCHA(free) orAkismet(free for personal use).
Visit the respective website to obtain the keys required to activate the protection method of your
choice.DependenciesPython LibsIf you decide to use the ReCAPTCHA spam protection method you need to install the python libraryrecaptcha-client(packagepython-recaptchain Debian).If you use Akismet for spam protectionakismetis needed. You also need to set your domain url in django admin in the section “sites”.For Python version <2.7,importlibhas to be installed sinceimportlibis in the standard library in Python 2.7, but is a third-party package for older versions.All libraries can be installed bypiporeasy_install.It is recommended but not required to use South. Again it can be easily installed bypiporeasy_install.InstallationDownloadFrom PyPIYou can simply type into a terminalpip installcmsplugin-contactoreasy_installcmsplugin-contact.ManuallyYou can download a zip archive of thelatest development versionfrom GitHub.
Unzip the file you downloaded. Then go in your terminal andcdinto the unpacked folder. Then typepython setup.py installin your terminal.SetupPut'cmsplugin_contact'in yourINSTALLED_APPSsection in settings.py. Don’t forget to syncdb your database or migrate if you’re using South.Put'cmsplugin_contact.middleware.ForceResponseMiddleware'in yourMIDDLEWARE_CLASSESsection in settings.py.SettingsDEFAULT_FROM_EMAILThe email address that is used to send the message is picked up fromDEFAULT_FROM_EMAILDjango setting.
Additionally, theReply-To:header is set to the user-supplied email address.Sending the message using the user-supplied address to setFrom:header of the email is
currently not supported.
This is because many servers will reject emails that useFrom:addresses not registered with
that server.
Some servers may also strip theReply-To:header. For this, the user-supplied email address
is also added to the body of the message.RECAPTCHA_PUBLIC_KEY and RECAPTCHA_PRIVATE_KEYIf you don’t want to enter the ReCATPCHA keys in the admin interface you can provide them through these settings.AKISMET_API_KEYThe same as for ReCAPTCHA goes fo Akismet.CMSPLUGIN_CONTACT_FORMSDefault:(
    ('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'EditorsThe default editor is WYMEditor like in Django CMS.
The plugin respects theUSE_TINYMCEsetting 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 yourINSTALLES_APPSCKEditor is used.ExtendingSeeexamples/cmsplugin_custom_contacthow to subclasscmsplugin_contactand add custom fields into it. You can override
properties of the subclassedContactPluginand use your own templates
and classes.SignalsEmail sentAfter 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']