Skip to content

Instantly share code, notes, and snippets.

@rense
Created January 20, 2017 10:25
Show Gist options
  • Save rense/99914d02c88bd444e5de3abdd92864f9 to your computer and use it in GitHub Desktop.
Save rense/99914d02c88bd444e5de3abdd92864f9 to your computer and use it in GitHub Desktop.
A nicer Django AUTH_PASSWORD_VALIDATORS setting
_validator_module = 'django.contrib.auth.password_validation'
AUTH_PASSWORD_VALIDATORS = [
{'NAME': '%s.UserAttributeSimilarityValidator' % _validator_module},
{'NAME': '%s.MinimumLengthValidator' % _validator_module},
{'NAME': '%s.CommonPasswordValidator' % _validator_module},
{'NAME': '%s.NumericPasswordValidator' % _validator_module},
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment