跳转到主要内容

为django登录表单添加HashCash.IO "工作量证明"控制。

项目描述

django-hashcash
===============

此项目将http://hashcash.io实现到正常的Django登录表单中。
这很有用,因为它可能可以阻止对登录表单的暴力攻击。


安装
------------

### 1. 获取应用程序: `pip install django-hashcash`

### 2. 更新settings.py

````
# settings.py

...

#
# 将django_hashcash安装到INSTALLED_APPS
#
INSTALLED_APPS += (
'django_hashcash',
)

...

#
# 添加从https://hashcash.io/获取的详细信息
#
HASHCASHIO_PUBLIC_KEY = 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'
HASHCASHIO_PRIVATE_KEY = 'PRIVATE-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'
...
````

### 3. 更新urls.py

````
# urls.py

...
from django_hashcash.forms import HashCashAuthenticationForm

...

admin.autodiscover()
admin.site.login_template = 'django_hashcash/login.html'
admin.site.login_form = HashCashAuthenticationForm
...
````

### 完成!

项目详情


下载文件

下载适用于您的平台的文件。如果您不确定选择哪个,请了解更多关于 安装软件包 的信息。

源分布

django-hashcash-0.2.1.tar.gz (8.4 kB 查看哈希值)

上传时间 来源

支持者