Created
August 27, 2015 00:24
-
-
Save carlos-jenkins/428be427020c500831a8 to your computer and use it in GitHub Desktop.
Generate Django SECRET_KEY
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
from django.utils.crypto import get_random_string | |
chars = 'abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*(-_=+)' | |
if __name__ == '__main__': | |
print(get_random_string(50, chars)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is example what Django
python manage.py startproject
command does:https://github.com/django/django/blob/master/django/core/management/commands/startproject.py#L30