I am using the function 'validate_password (password, new_user)' and I have my settings configured in Spanish, the problem comes when the validate_password function raises an error with the word 'contraseña' and shows me this error:
ValidationError: [u'La contrase\xf1a es demasiado similar a la de nombre de usuario.']
I am using python 2.7 and Django 1.11.4
This is the traceback:
Traceback (most recent call last):
File "/Users/adrianmansilla/Documents/sisgos/venv/lib/python2.7/site-packages/django/core/handlers/exception.py", line 41, in inner
response = get_response(request)
File "/Users/adrianmansilla/Documents/sisgos/venv/lib/python2.7/site-packages/django/core/handlers/base.py", line 187, in _get_response
response = self.process_exception_by_middleware(e, request)
File "/Users/adrianmansilla/Documents/sisgos/venv/lib/python2.7/site-packages/django/core/handlers/base.py", line 185, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/Users/adrianmansilla/Documents/sisgos/venv/lib/python2.7/site-packages/django/contrib/auth/decorators.py", line 23, in _wrapped_view
return view_func(request, *args, **kwargs)
File "/Users/adrianmansilla/Documents/sisgos/venv/lib/python2.7/site-packages/django/utils/decorators.py", line 185, in inner
return func(*args, **kwargs)
File "/Users/adrianmansilla/Documents/sisgos/sisgos/company/views.py", line 129, in new_user
validate_password(password, new_user)
File "/Users/adrianmansilla/Documents/sisgos/venv/lib/python2.7/site-packages/django/contrib/auth/password_validation.py", line 56, in validate_password
raise ValidationError(errors)
ValidationError: [u'La contrase\xf1a es demasiado similar a la de nombre de usuario.']
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/867d623d-7707-4f16-a779-293d8643b80f%40googlegroups.com.--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-developers+unsubscribe@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.