Coder Social home page Coder Social logo

foonnnnn / cmsplugin-contact Goto Github PK

View Code? Open in Web Editor NEW

This project forked from maccesch/cmsplugin-contact

0.0 1.0 0.0 196 KB

Extendable contact plugin for django-cms with spam protection and i18n

License: BSD 2-Clause "Simplified" License

cmsplugin-contact's Introduction

Django CMS Contact Form Plugin

Contact form plugin for Django CMS with spam protection and i18n.

If you want to use ReCAPTCHA you have to get a Public and Private Key from http://www.google.com/recaptcha. You can get them for free.

The Akismet spam protection method requires an Akismet API Key which is obtainable from http://akismet.com/ For private persons this is free, too.

Dependencies

Python Libs

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".

Both 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.

Installation

Download

From PyPI

You can simply type into a terminal pip install cmsplugin-contact or easy_install cmsplugin-contact.

Manually

You can download a zipped archive from http://github.com/maccesch/cmsplugin-contact/downloads.

Unzip the file you downloaded. Then go in your terminal and cd into the unpacked folder. Then type python setup.py install in your terminal.

Setup

Put 'cmsplugin_contact' in your INSTALLED_APPS section in settings.py. Don't forget to syncdb your database or migrate if you're using South.

Settings

RECAPTCHA_PUBLIC_KEY and RECAPTCHA_PRIVATE_KEY

If you don't want to enter the ReCATPCHA keys in the admin interface you can provide them through these settings.

AKISMET_API_KEY

The same as for ReCAPTCHA goes fo Akismet.

DEFAULT_FROM_EMAIL

This django setting is used to set the From header of the emails. The value you can enter in django admin only sets the Reply-To header. This is because many servers reject mails that claim to be From different email addresses than registered with the server.

Editors

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.

Extending

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.

Signals

Email sent

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']

cmsplugin-contact's People

Contributors

atiberghien avatar d3ph avatar dsh2dsh avatar genbit avatar gfavre avatar ikresoft avatar itbabu avatar julsam avatar lacrymology avatar m000 avatar maccesch avatar masarliev avatar mitar avatar tpresthus avatar xdml avatar yohanboniface avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.