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_captcha 的 url 到你的项目 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, # 不需要输验证码的最大失败次数
}

Metadata

Release files for django-simpleui-captcha 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-simpleui-captcha 0.1.4
File Size Uploaded
django_simpleui_captcha-0.1.4.tar.gz 24.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-simpleui-captcha 0.1.4
File Interpreter ABI Platform
django_simpleui_captcha-0.1.4-py3-none-any.whl Python 3 none any Details

Total release size: 32.1 kB

Release files / django_simpleui_captcha-0.1.4.tar.gz

Download URL django_simpleui_captcha-0.1.4.tar.gz
Size 24.9 kB
Tags Source
SHA-256 checksum
How to use checksums
a6d58aaa608b795bd803766c07396a06a5d7a7e8bb93f1d6787bac5116f2e377
BLAKE2b-256 checksum
How to use checksums
ee396930135b8e1e9167148f009dc95a32e878e47c0c793e792bfef2eae992a0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.6

Release files / django_simpleui_captcha-0.1.4-py3-none-any.whl

Download URL django_simpleui_captcha-0.1.4-py3-none-any.whl
Size 7.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cf2c453ee33d23f866e11d057a270d42f01ee5370a5aa152729159d2abf584f9
BLAKE2b-256 checksum
How to use checksums
00221640762295a764a4a548f7d3744447c86411e636ee368773cc64c190ce15
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.6

Release history Release notifications | RSS feed

This release

0.1.4 This release

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page