On Wednesday, August 26, 2015 at 10:16:21 AM UTC+12, Punx Phil wrote:

The quick setup may tell someone instantly if this would work with 
mezzanine:

Quick setup
===========

* Install ``django_auth_policy`` using pip, easy_install or the
  provided setup.py.

* Add ``django_auth_policy`` to Django setting ``INSTALLED_APPS``.

* Add ``django_auth_policy.middleware.AuthenticationPolicyMiddleware`` to the
  Django setting ``MIDDLEWARE_CLASSES``, make sure to include it *after*
  Django's ``AuthenticationMiddleware``.

* Use the authentication form and the change password forms from
  ``django_auth_policy.forms``.

.. FIXME: Full example of log-in, log-out and change password views

* Add policies to your settings, a good starting point can be::

    AUTHENTICATION_POLICIES = (
        ('django_auth_policy.authentication.AuthenticationBasicChecks', {}),
        ('django_auth_policy.authentication.AuthenticationDisableExpiredUsers', 
{}),
        ('django_auth_policy.authentication.AuthenticationLockedUsername', {}),
        ('django_auth_policy.authentication.AuthenticationLockedRemoteAddress', 
{}),
    )

    PASSWORD_STRENGTH_POLICIES = (
        ('django_auth_policy.password_strength.PasswordMinLength', {}),
        ('django_auth_policy.password_strength.PasswordContainsUpperCase', {}),
        ('django_auth_policy.password_strength.PasswordContainsLowerCase', {}),
        ('django_auth_policy.password_strength.PasswordContainsNumbers', {}),
        ('django_auth_policy.password_strength.PasswordContainsSymbols', {}),
        ('django_auth_policy.password_strength.PasswordUserAttrs', {}),
        ('django_auth_policy.password_strength.PasswordDisallowedTerms', {
            'terms': ['Testsite'] 

        }), 

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to