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.']

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/c6146f4a-e890-47c3-a6b4-e0d237d0073f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to