Django rest recaptcha field for easy integration of google recaptcha with django-rest-framework.
Project description
Django Rest reCAPTCHA
================
**Django Rest reCAPTCHA field to add google recaptcha in django-rest-framework**
Requirements
------------
Tested with:
* Python: 2.7, 3.5
* Django: 1.8, 1.9, 1.10, 1.11
Installation
------------
#. Install with ``pip install django-rest-recaptcha``.
#. Add ``'recaptcha'`` to your ``INSTALLED_APPS`` setting.
#. Register and obtain recaptcha keys here `https://www.google.com/recaptcha/admin`
#. Add the obtained keys to settings(For testing and development you can leave it blank to use
default test keys as mentioned here `https://developers.google.com/recaptcha/docs/faq`).
For example:
.. code-block:: python
GR_CAPTCHA_SECRET_KEY = 'GoogleRecaptchaPrivateKey001'
Usage
-----
#. Now you can import and use the recaptcha field in your serializer.
For example:
.. code-block:: python
from rest_framework import serializers
from recaptcha.fields import ReCaptchaField
class ExampleSerializer(serializers.Serializer):
recaptcha = ReCaptchaField(write_only=True)
...
================
**Django Rest reCAPTCHA field to add google recaptcha in django-rest-framework**
Requirements
------------
Tested with:
* Python: 2.7, 3.5
* Django: 1.8, 1.9, 1.10, 1.11
Installation
------------
#. Install with ``pip install django-rest-recaptcha``.
#. Add ``'recaptcha'`` to your ``INSTALLED_APPS`` setting.
#. Register and obtain recaptcha keys here `https://www.google.com/recaptcha/admin`
#. Add the obtained keys to settings(For testing and development you can leave it blank to use
default test keys as mentioned here `https://developers.google.com/recaptcha/docs/faq`).
For example:
.. code-block:: python
GR_CAPTCHA_SECRET_KEY = 'GoogleRecaptchaPrivateKey001'
Usage
-----
#. Now you can import and use the recaptcha field in your serializer.
For example:
.. code-block:: python
from rest_framework import serializers
from recaptcha.fields import ReCaptchaField
class ExampleSerializer(serializers.Serializer):
recaptcha = ReCaptchaField(write_only=True)
...
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Close
Hashes for django-rest-recaptcha-1.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | a47f63bab4da45f5511b701ab33d616d160504bb5016f0624cde43380d8781f2 |
|
MD5 | 60d3456ffd6d38770fd32e2f4717e7cd |
|
BLAKE2b-256 | 118f3d9f412e109395246db2b4fd27733b138d033c29827fe1ddc0b4b2691de4 |