Installation
-
Install
django-simple-captcha
via pip:pip install django-simple-captcha
-
Add
captcha
to theINSTALLED_APPS
in yoursettings.py
-
Run
python manage.py migrate
-
Add an entry to your
urls.py
:
urlpatterns += [
url(r'^captcha/', include('captcha.urls')),
]
Note: PIL and Pillow require that image libraries are installed on your system. On e.g. Debian or Ubuntu, you’d need these packages to compile and install Pillow:
apt-get -y install libz-dev libjpeg-dev libfreetype6-dev python-dev
Adding to a Form
Using a CaptchaField
is quite straight-forward: