Installation
Requirements
This application requires
Django 3.0 or newer
Cracklib
To use the included CracklibValidator
the Python bindings for cracklib need to be installed.
Warning
The CracklibValidator is not
used if the crack module is not installed.
On most linux distros it can simply be installed via a package manager. On Debian based distributions the according package is called:
python-cracklib
Levenshtein
The included PasswordPoliciesChangeForm uses
the Levenshtein Python C extension module.
Warning
The PasswordPoliciesChangeForm does not
compare both the old and new password if the module is not installed.
On most linux distros it can simply be installed via a package manager. On Debian based distributions the according package is called:
python-levenshtein
From Pypi
To install from PyPi:
[sudo] pip install django-password-policies
or:
[sudo] easy_install django-password-policies
From source
The latest release package can be downloaded from the GitHub download page.
Once you’ve downloaded the package, unpack it (on most operating systems, simply double-click; alternately, at a command line on Linux, Mac OS X or other Unix-like systems, type):
$ tar zxvf django-password-policies-<VERSION>.tar.gz
This will create the directory:
django-password-policies-<VERSION>
which contains
the setup.py installation script. From a command line in that directory,
type:
python setup.py install
Note that on some systems you may need to execute this with
administrative privileges (e.g., sudo python setup.py install).
Another possibility to install the application is to create a link to the app inside the Python path:
$ sudo ln -s django-password-policies/password_policies /path/to/python_site_packages/password_policies