Skip to main content

simpleui_captcha is a django admin captcha packages

Project description

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

Project details


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.3.tar.gz (16.4 kB view details)

Uploaded Source

Built Distribution

django_simpleui_captcha-0.1.3-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

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

Hashes for django-simpleui-captcha-0.1.3.tar.gz
Algorithm Hash digest
SHA256 458c9bb8e9222ede2fa5141f2619138e3166d3d2f3bc92bc05c879e6726dfc74
MD5 22211517c3cd3cc61bb65859a9997f08
BLAKE2b-256 c8b88af96b1f23ae9d6720c7bc07a6172b30a577df6584ddc64fbfe74ed2147f

See more details on using hashes here.

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

Hashes for django_simpleui_captcha-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 97b4cc51648227741ba9a9bca179d4784f3a80068041a1279d989fa8f6b7963f
MD5 db7859cfc36b3b669574cdbbd2687dba
BLAKE2b-256 30a866b28f01d3978f3f220d1be08020c88f27cc555b1ab7a839774252617611

See more details on using hashes here.

Supported by

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