{ "info": { "author": "Justin Quick", "author_email": "justquick@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Utilities" ], "description": "Simple Math Captcha\n=========================\n\n:Authors:\n Justin Quick \n:Version: 0.1.2\n\nNote: this includes an update to a deprecated import in the util.py file in order to make this Django 1.6+ compatible.\n\nDjango Math Captcha is an easy way to add mathematical captcha verification to your already existing forms.\nIt asks you a simple math question (eg ``'1 + 2 ='``) and validates the form if your response is correct.\nAll you have to do is subclass either ``MathCaptchaForm`` or ``MathCaptchaModelForm`` in your own forms.\n\nExtending your forms::\n\n from math_captcha import MathCaptchaModelForm\n from myapp.forms import BlogForm\n\n class MyExistingForm(BlogForm,MathCaptchaModelForm): # instead of forms.ModelForm\n #... extra fields here\n \n\nNow you can be certain that the only users who create blogs are humans. \n\nCheck out the example project for more practical use and tests.\n\nUsing with other apps\n----------------------\n\nIf you are running an app like, say `django-contact-form`_ and want to add math captcha here is how to go about it.\n\nAdd the following in your ``urls.py``::\n\n from contact_form.forms import ContactForm\n from math_captcha.forms import MathCaptchaForm\n \n class CaptchaContactForm(ContactForm,MathCaptchaForm):\n pass\n \n urlpatterns = patterns('',\n ...\n url(r'^contact/$','contact_form.views.contact_form',{'form_class':CaptchaContactForm},name='contact_form'),\n url(r'^contact/sent/$','django.views.generic.simple.direct_to_template',{ 'template': 'contact_form/contact_form_sent.html' },name='contact_form_sent'),\n ...\n )\n \nNow the contact form will block robots who cant do math.\n\n.. _django-contact-form: http://bitbucket.org/ubernostrum/django-contact-form\n\nSettings\n---------\n\nSet the behavior of the math captcha interaction in your ``settings.py``\n\n``MATH_CAPTCHA_NUMBERS = (1,2,3,4,5)``\n\nA list of numbers to randomly choose from when generating the questions.\nDefaults to 1 through 5.\n\n``MATH_CAPTCHA_OPERATORS = '+-'``\n\nString containing mathematical operators to use. Default is only add (``+``) and subtract (``-``).\nAvailable operators are: add (``+``), subtract (``-``), multiply (``*``), divide (``/``), and modulo (``%``)\n\n``MATH_CAPTCHA_QUESTION = 'Are you human?'``\n\nQuestion that appears on forms as a label for math questions. By default it is ``'Are you human?'``", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/ebpetway/django-math-captcha", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "django-math-captcha-update", "package_url": "https://pypi.org/project/django-math-captcha-update/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-math-captcha-update/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/ebpetway/django-math-captcha" }, "release_url": "https://pypi.org/project/django-math-captcha-update/0.1.2/", "requires_dist": null, "requires_python": null, "summary": "Simple, secure math captcha for django forms(Django 1.6+ compatible)", "version": "0.1.2" }, "last_serial": 1194453, "releases": { "0.1.1": [ { "comment_text": "", "digests": { "md5": "6ec6238c3eb453ab81c83201a3fa24f1", "sha256": "3430d7020fbdd779c82ccc9caa5e7ff4f48464352a8ef8025734635c880c8f9c" }, "downloads": -1, "filename": "django-math-captcha-update-0.1.1.tar.gz", "has_sig": false, "md5_digest": "6ec6238c3eb453ab81c83201a3fa24f1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4011, "upload_time": "2014-08-18T19:46:45", "url": "https://files.pythonhosted.org/packages/98/9f/3fd62399aa21ae090c1b11c84d743e32236c417c72da9aadf8477c3c769d/django-math-captcha-update-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "0aba6a0efe7711c376146d461e1ef7a6", "sha256": "87f2cb2baf88c1d2adff34c7039f131ff383c3ff125b3bc765c16aa202f924e6" }, "downloads": -1, "filename": "django-math-captcha-update-0.1.2.tar.gz", "has_sig": false, "md5_digest": "0aba6a0efe7711c376146d461e1ef7a6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4012, "upload_time": "2014-08-18T19:54:38", "url": "https://files.pythonhosted.org/packages/a8/1f/5c0c7c866eda1494621f4e423639ba2bf11589e7669de8937a7b19bc7047/django-math-captcha-update-0.1.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "0aba6a0efe7711c376146d461e1ef7a6", "sha256": "87f2cb2baf88c1d2adff34c7039f131ff383c3ff125b3bc765c16aa202f924e6" }, "downloads": -1, "filename": "django-math-captcha-update-0.1.2.tar.gz", "has_sig": false, "md5_digest": "0aba6a0efe7711c376146d461e1ef7a6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4012, "upload_time": "2014-08-18T19:54:38", "url": "https://files.pythonhosted.org/packages/a8/1f/5c0c7c866eda1494621f4e423639ba2bf11589e7669de8937a7b19bc7047/django-math-captcha-update-0.1.2.tar.gz" } ] }