simpleui_captcha is a django admin captcha packages
Project description
django-simpleui-captcha
django-simpleui-captcha 是一个 django 后台管理登录验证码插件
界面
安装
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, # 不需要输验证码的最大失败次数
}
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
Built Distribution
File details
Details for the file django-simpleui-captcha-0.1.3.tar.gz
.
File metadata
- Download URL: django-simpleui-captcha-0.1.3.tar.gz
- Upload date:
- Size: 16.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.7.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 458c9bb8e9222ede2fa5141f2619138e3166d3d2f3bc92bc05c879e6726dfc74 |
|
MD5 | 22211517c3cd3cc61bb65859a9997f08 |
|
BLAKE2b-256 | c8b88af96b1f23ae9d6720c7bc07a6172b30a577df6584ddc64fbfe74ed2147f |
File details
Details for the file django_simpleui_captcha-0.1.3-py3-none-any.whl
.
File metadata
- Download URL: django_simpleui_captcha-0.1.3-py3-none-any.whl
- Upload date:
- Size: 7.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.7.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 97b4cc51648227741ba9a9bca179d4784f3a80068041a1279d989fa8f6b7963f |
|
MD5 | db7859cfc36b3b669574cdbbd2687dba |
|
BLAKE2b-256 | 30a866b28f01d3978f3f220d1be08020c88f27cc555b1ab7a839774252617611 |