IntroductionContact-recaptcha is a simple-to-install contact form application for Django that uses reCAPTCHA to fight spam.
Here's an example of it in use, with a slightly customised template.
A
... [More]
few more examples:
with the default template the default templates have been translated into French
How does it work?Very simply:
visitor loads contact page. types in message & clicks ok. the captcha is verified by reCAPTCHA. visitor gets redirected first to a 'thank you' page. then to another (pre-defined) page in the site. meanwhile, the form content is emailed to a (pre-defined) email address.
Design considerationsContact-recaptcha is deliberately kept very basic; for a more generic and extensible contact form application see django-contact-form
CreditsThe recaptcha.py file was copy-and-pasted from recaptcha-client.
InstallationSystem requirements:
python 2.4 or higher. django 1.0 or higher.
InstructionsGet the source code to contact-recaptcha from the subversion repository and copy it into your project. Setup a reCAPTCHA account Add contact-recaptcha to your project's INSTALLED_APPS. Add the following URL pattern to your root URLConf: (r'^contact/', include('contact_recaptcha.urls'),Add these new custom settings to your settings.py file. Required settings: RECAPTCHA_PUB_KEY: public key obtained from reCAPTCHA. RECAPTCHA_PRIVATE_KEY: private key obtained from reCAPTCHA. EXTERNAL_RECAPTCHA: Boolean; should the connection to recaptcha be activated in the contact page? You can set this flag to False in your dev environment. Optional settings. Define these only if you need to override the default values: CONTACT_EMAIL: list of emails addresses to send the contact message to; default value is settings.MANAGERS CONTACT_NEXT_URL: URL to redirect a visitor to after displaying the 'Thank You' page; default value is '/' (website root). TemplatesDefault templates are supplied to get you up and running quickly, but you can of course override them if required.
The default templates use CSS for styling; if you use the standard templates you'll very probably need to edit this. Please see file contact-recaptcha/templates/contact/README.txt for more information. [Less]