Skip to main content

A combination of piran’s django-zxcvbn and aj-may’s django-password-strength Django apps. It combines back-end and front-end validation with strength meter display.

Installation

Run pip install django-zxcvbn-password. Then in your settings:

INSTALLED_APPS = (
    ...
    django_zxcvbn_password,
    ...
)

Usage

# forms.py

from django import forms
from django_zxcvbn_password.fields import PasswordField, PasswordConfirmationField

class RegisterForm(forms.Form):
    password1 = PasswordField()
    password2 = PasswordConfirmationField(confirm_with=password1)

Screenshot

http://img15.hostingpics.net/pics/295712Capturedu20150201153746.png

Configuration

You can configure minimum and maximum length of the password, and the minimum entropy (refer to zxcvbn documentation for more details). The following values are the default:

# settings.py

PASSWORD_MIN_LENGTH = 8
PASSWORD_MAX_LENGTH = 128
PASSWORD_MIN_ENTROPY = 25

License

zxcvbn (https://github.com/lowe/zxcvbn), django-zxcvbn (https://github.com/piran/django-zxcvbn) and django-password-strength (https://github.com/aj-may/django-password-strength) are redistributed under the terms of the BSD license, hence django-zxcvbn-password (https://github.com/Pawamoy/zxcvbn-password) is also redistributed under the terms of the BSD license:

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Download files

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

Source Distribution

django-zxcvbn-password-1.0.3.tar.gz (335.1 kB view details)

Uploaded Source

File details

Details for the file django-zxcvbn-password-1.0.3.tar.gz.

File metadata

File hashes

Hashes for django-zxcvbn-password-1.0.3.tar.gz
Algorithm Hash digest
SHA256 d395e4ca2ff29b4bcc1c3b0ab5bf2bee3e6bc5f9ddcfed3c2d37d0f1ca33646d
MD5 dfd3635bb2e71b464d74d842958bc1df
BLAKE2b-256 ee9d69252f4af25c4b84eb4d4ee6fea9395b356ed04b8e585fbed9e92346de33

See more details on using hashes here.

Supported by

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