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

Uploaded Source

File details

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

File metadata

File hashes

Hashes for django-zxcvbn-password-1.0.4.tar.gz
Algorithm Hash digest
SHA256 6f431ac7e219e0cae39d90e7493c540705fd3a562502bd6dfc37b510aed164e3
MD5 56b6832762b8f22ad8695c42b87603b2
BLAKE2b-256 4bcfd7b1cc977a31c82cc472b4c0286e3744c922df4981729268926f0f04b5bc

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 Sentry Error logging StatusPage Status page