Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

131
Vistas
Django fails user authentication

Check user password fails after save

Django 1.11 postgres (postgis)

password hashes defined in settings.py

PASSWORD_HASHERS = [
    'django.contrib.auth.hashers.PBKDF2PasswordHasher',
    'django.contrib.auth.hashers.PBKDF2SHA1PasswordHasher',
    'django.contrib.auth.hashers.Argon2PasswordHasher',
    'django.contrib.auth.hashers.BCryptSHA256PasswordHasher',
    'django.contrib.auth.hashers.BCryptPasswordHasher', ]

What I trying to do:

> ./manage shell
    In [1]: from accounts.models import User

In [2]: u = User.objects.get(pk=1)

In [3]: u.password
Out[3]: 'pbkdf2_sha256$36000$LlYFKXzibqZP$t7njfFLddkUos0ePjMTlSqM2KVhduFVvXTEobiHbXng=                                                   '

In [4]: u.check_password('123456')
Out[4]: False

In [5]: u.refresh_from_db()

In [6]: u.set_password('123456')

In [7]: u.password
Out[7]: 'pbkdf2_sha256$36000$WwQpAA6KyVX8$2GMy23BV1go4h/f/nlBezA50Jsc7QOi2sBlZsYhPAYM='

In [8]: u.check_password('123456')
Out[8]: True

In [9]: u.refresh_from_db()

In [10]: u.password
Out[10]: 'pbkdf2_sha256$36000$LlYFKXzibqZP$t7njfFLddkUos0ePjMTlSqM2KVhduFVvXTEobiHbXng=                                                   '

In [11]: u.check_password('123456')
Out[11]: False

Update: First I thought it because migrate database from mysql to postgres but even for reseting password

over 4 years ago · Santiago Trujillo
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda