Purgeable / full-app

Keep all functionality for (parsers + db + frontend API) inside one Django project.
0 stars 1 forks source link

Import error for AUTH_PASSWORD_VALIDATORS #22

Closed Rub4ek closed 6 years ago

Rub4ek commented 7 years ago

There is AUTH_PASSWORD_VALIDATORS setting in settings.py with validators like

django.contrib.authentication.password_validation.UserAttributeSimilarityValidator

that raises import error.

So django.contrib.authentication should be changed to django.contrib.auth

epogrebnyak commented 7 years ago

Maybe this is django version problem? Which version do you use?

23 сент. 2017 г. 20:11 пользователь "Rub4ek" notifications@github.com написал:

There is AUTH_PASSWORD_VALIDATORS setting in settings.py with validators like

django.contrib.authentication.password_validation.UserAttributeSimilarityValidator

That raises import error. So django.contrib.authentication should be changed to django.contrib.auth

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mini-kep/full-app/issues/22, or mute the thread https://github.com/notifications/unsubscribe-auth/AI1grmqSpdtqsIjAoNyM44fx7u_2FaVuks5slTu7gaJpZM4PhneE .

Rub4ek commented 7 years ago

The one specified in reqirements.txt

epogrebnyak commented 7 years ago

When does the issue arise? Need more information from you to be able to replicate the problem.

Ideally, need a test that is failing on you setup and see if itfails on travis.

23 сент. 2017 г. 20:19 пользователь "Rub4ek" notifications@github.com написал:

The one specified in reqirements.txt

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/mini-kep/full-app/issues/22#issuecomment-331653305, or mute the thread https://github.com/notifications/unsubscribe-auth/AI1grmuuw4pcMc7rFZLnmxY0NwdsyN5Cks5slTytgaJpZM4PhneE .

Rub4ek commented 7 years ago

@epogrebnyak try to change password in /admin/.

Or using manage.py shell

from django.contrib.auth import get_user_model
User = get_user_model()
u = User.objects.get(username='admin')
u.set_password('qwerty')
u.save()
Rub4ek commented 7 years ago

@epogrebnyak also take a look at docs for 1.11 https://docs.djangoproject.com/en/1.11/topics/auth/passwords/#enabling-password-validation