Last active
September 29, 2019 21:13
-
-
Save sirodoht/3925a0bf4e187115dd13a7698892bec9 to your computer and use it in GitHub Desktop.
Generating a SECRET_KEY for Django.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/local/bin/python3 | |
import random | |
secret_key = ''.join([random.SystemRandom().choice('abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*(-_=+)') for i in range(50)]) | |
print(secret_key) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment