Skip to content

Instantly share code, notes, and snippets.

@ocavue
Created December 23, 2019 03:48
Show Gist options
  • Select an option

  • Save ocavue/75c41445d3694e00795f8454bb96a41b to your computer and use it in GitHub Desktop.

Select an option

Save ocavue/75c41445d3694e00795f8454bb96a41b to your computer and use it in GitHub Desktop.
A same script to generate django user password with custom iterations
from django.conf import settings
from django.contrib.auth.hashers import make_password, PBKDF2PasswordHasher
RAW_PASSWORD = 'my_password!'
settings.configure()
PBKDF2PasswordHasher.iterations = 10
print(make_password(RAW_PASSWORD))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment