hye. Je ne peux pas importer mon nouveau hasher de mot de passe personnalisé et je n'arrive toujours pas à comprendre pourquoi.Erreur de hachage du mot de passe personnalisé python
l'erreur:
ImportError at /admin/
No module named 'honeywordHasher.hashers.MyHoneywordHasherdjango'; 'honeywordHasher.hashers' is not a package
je l'ai déjà fait installer honeywordHasher dans INSTALLED_APPS et j'ai la initialisation .py dans le fichier honeywordHasher.
répertoire:
C:.
├───checkout
│ ├───migrations
│ │ └───__pycache__
│ ├───templates
│ └───__pycache__
├───contact
│ ├───migrations
│ │ └───__pycache__
│ ├───templates
│ └───__pycache__
├───custom_user
│ ├───migrations
│ │ └───__pycache__
│ └───__pycache__
├───honeywordHasher
│ ├───migrations
│ │ └───__pycache__
│ └───__pycache__
├───profiles
│ ├───migrations
│ │ └───__pycache__
│ ├───templates
│ │ └───accounts
│ └───__pycache__
├───register
│ ├───migrations
│ ├───templates
│ │ └───accounts
│ └───__pycache__
├───sqlite
├───tryFOUR
│ └───__pycache__
└───__pycache__
settings.py:
PASSWORD_HASHERS = [
'honeywordHasher.hashers.MyHoneywordHasher'
'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',
]
je crée déjà hashers.py et aussi la génération honeyword dans honeywordgen.py. J'ai toujours cette erreur. Est-ce que quelqu'un peut m'aider ?