I need to generate an encrypted password that can be used within Django in a simple python script. What package/module would I need to import to achieve that? I am looking for something like:
from django.auth import create_password_from_string
django_password = create_password_from_string('coolpassword')
The background is, that I have a PHP application on server1 which should share the accounts with a Django application on server2. When an account is created in the PHP application, I want to fire up a python script that generates the encrypted password for the django application and transfers it to server2.
Of course, creating the encrypted string by PHP would be much better for this usecase, but I bet its even harder to achieve.