Skip to main content

Will add an reCAPTCHA field to Django admin login page to provide a more secure page

Project description

Django4_reCAPTCHA_admin_login_page

Will add an reCAPTCHA field to Django Admin Login Page to provide a more secure page

========================================================================

Steps to fast deployment:

  1. Sign up for reCAPTCHA Google reCAPTCHA.

  2. Install using: pip3 install django4-recaptcha-admin-login

  3. Add 'django4_recaptcha_admin_login' and 'captcha' to your INSTALLED_APPS in settings.py


INSTALLED_APPS = [
    ...,
    'django4_recaptcha_admin_login',
    'captcha',
    ...
]

  1. Add the Google reCAPTCHA keys generated in step 1 to your Django production settings with RECAPTCHA_PUBLIC_KEY and RECAPTCHA_PRIVATE_KEY.

Example: in settings.py:

RECAPTCHA_PUBLIC_KEY = os.environ.get('RECAPTCHA_PUBLIC_KEY')
RECAPTCHA_PRIVATE_KEY = os.environ.get('RECAPTCHA_PRIVATE_KEY')

And in env.py:

os.environ.setdefault('RECAPTCHA_PUBLIC_KEY',
                      'your public key')
os.environ.setdefault('RECAPTCHA_PRIVATE_KEY',
                      'your private key')
  1. Edit project urls.py file and change the import of admin:

From:

from django.contrib import admin

To:

from django4_recaptcha_admin_login import admin

This is all.

This package is depending on django-recaptcha 3.0.0 package. For extended informations and suport for django-recaptcha please see: https://pypi.org/project/django-recaptcha/

This package was tested on Django==4.1.2 and Python 3.10.8

Project details


Release history Release notifications | RSS feed

This version

1.0

Download files

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

Source Distribution

django4-recaptcha-admin-login-1.0.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django4_recaptcha_admin_login-1.0-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file django4-recaptcha-admin-login-1.0.tar.gz.

File metadata

File hashes

Hashes for django4-recaptcha-admin-login-1.0.tar.gz
Algorithm Hash digest
SHA256 4605bd23ef1ca9b1bb5527830cec357e1965afc8b332f5b9954b25a8afef81b3
MD5 a47b2d7aaf4ed16be9c09d0c5d63cf55
BLAKE2b-256 8784a62ac51d1904982e5d871482a81c36a89d3438f4ac7b5b82b1384e5dea20

See more details on using hashes here.

File details

Details for the file django4_recaptcha_admin_login-1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for django4_recaptcha_admin_login-1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9d01445069084ca71abb5fe2c83625e3148751d08a679390606f8d6d89f7539b
MD5 50db17d8847659f086aba3b0520f6ad8
BLAKE2b-256 1ab708208c19833498477ad06aaccc54169bb150b03b2927996893fa3b4f8f5a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page