Skip to main content

django-simpleui-captcha

PyPI version

django-simpleui-captcha 是一个 django 后台管理登录验证码插件

界面

image

安装

pip install django-simpleui-captcha

依赖

  • Django
  • django-simple-captcha

快速开始

1. 添加 "simpleui_captcha" 到 INSTALLED_APPS 设置, 注意要放在最前面

INSTALLED_APPS = [
    "simpleui_captcha",
    "simpleui",
    ... 
]

2. 添加 simpleui_captchaurl 到你的项目 urls.py ::

path('simpleui_captcha/', include('simpleui_captcha.urls')),

3. 运行 python manage.py migrate 迁移验证码模型

4.(可选)后台在连续登录n次失败后,要求输入验证码登录

# urls.py
from simpleui_captcha.views import LoginWithCaptcha


urlpatterns = [
    path('admin/login/', LoginWithCaptcha.as_view(), name='admin_login'),
    path('admin/', admin.site.urls),
    ...
]

# settings.py 默认值
SIMPLEUI_CAPTCHA = {
    'FAILED_LOGIN_COUNT_NAME': 'failed_login_count', # session 的键名
    'MAX_FAILED_LOGIN_COUNT': 3, # 不需要输验证码的最大失败次数
}

Download files

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

Source Distribution

django_simpleui_captcha-0.1.4.tar.gz (24.9 kB view details)

Uploaded Source

Built Distribution

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

django_simpleui_captcha-0.1.4-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file django_simpleui_captcha-0.1.4.tar.gz.

File metadata

  • Download URL: django_simpleui_captcha-0.1.4.tar.gz
  • Upload date:
  • Size: 24.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.6

File hashes

Hashes for django_simpleui_captcha-0.1.4.tar.gz
Algorithm Hash digest
SHA256 a6d58aaa608b795bd803766c07396a06a5d7a7e8bb93f1d6787bac5116f2e377
MD5 995b467e9f09dd78d3181d4e03e6d326
BLAKE2b-256 ee396930135b8e1e9167148f009dc95a32e878e47c0c793e792bfef2eae992a0

See more details on using hashes here.

File details

Details for the file django_simpleui_captcha-0.1.4-py3-none-any.whl.

File metadata

File hashes

Hashes for django_simpleui_captcha-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 cf2c453ee33d23f866e11d057a270d42f01ee5370a5aa152729159d2abf584f9
MD5 efbf6bfe92f9cfcbd4bb298855754b3f
BLAKE2b-256 00221640762295a764a4a548f7d3744447c86411e636ee368773cc64c190ce15

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.4 This release

2 files

0.1.3

2 files

0.1.2

2 files

0.1

2 files

Supported by

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