我们从Python开源项目中,提取了以下44个代码示例,用于说明如何使用django.conf.settings.AUTH_PASSWORD_VALIDATORS。
def get_default_password_validators(): return get_password_validators(settings.AUTH_PASSWORD_VALIDATORS)
def get_password_validators(validator_config): validators = [] for validator in validator_config: try: klass = import_string(validator['NAME']) except ImportError: msg = "The module in NAME could not be imported: %s. Check your AUTH_PASSWORD_VALIDATORS setting." raise ImproperlyConfigured(msg % validator['NAME']) validators.append(klass(**validator.get('OPTIONS', {}))) return validators