Skip to main content

reCAPTCHA field for Django REST framework serializers.

Project description

Django REST framework reCAPTCHA

.. image::

.. image::

.. image::

.. image::
:alt: Documentation Status

Django REST framework reCAPTCHA provides you a serializer field to handle and
validate Google reCAPTCHA response.


The full documentation is at


* Python: 2.7, 3.4, 3.5, 3.6, 3.7
* Django: 1.10, 1.11, 2.0, 2.1
* Django REST framework: 3.4, 3.5, 3.6, 3.7, 3.8, 3.9


To install Django REST framework reCAPTCHA, run this command in your terminal:

.. code-block:: console

$ pip install djangorestframework-recaptcha

This is the preferred method to install Django REST framework reCAPTCHA, as it
will always install the most recent stable release.

If you don't have `pip`_ installed, this `Python installation guide`_ can guide
you through the process.

.. _pip:
.. _Python installation guide:

Once the ``djangorestframework-recaptcha`` installed, add it to your

.. code-block:: python


Next, register yourself and obtain your reCAPTCHA credentials at

Finally, copy/paste your Google reCAPTCHA secret key to the

.. code-block:: python

DRF_RECAPTCHA_SECRET_KEY = "<your_reCAPTCHA_secret_key>"


To use Django REST framework reCAPTCHA within your project you'll need to
import and add the ``ReCaptchaField`` serializer field into the wanted
serializer. For example:

.. code-block:: python

from rest_framework import serializers
from rest_framework_recaptcha import ReCaptchaField

class MySerializer(serializers.Serializer):
recaptcha = ReCaptchaField()



0.2.0 (2018-12-21)


* Django REST framework 3.9, Python 3.7 & Django 2.1.
* Set long description content type to reStructuredText.

0.1.0 (2018-07-02)


* First release on PyPI.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

djangorestframework-recaptcha-0.2.0.tar.gz (11.5 kB view hashes)

Uploaded source

Built Distribution

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page