Skip to content

Instantly share code, notes, and snippets.

@hersonls
Last active June 2, 2019 22:00
Show Gist options
  • Save hersonls/4541319 to your computer and use it in GitHub Desktop.
Save hersonls/4541319 to your computer and use it in GitHub Desktop.
Django SECRET_KEY command line generator
python -c 'from django.utils.crypto import get_random_string; print "\nSECRET_KEY = \"%s\"\n" % get_random_string(50, "abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*(-_=+)")'
@dashohoxha
Copy link

tr -dc 'a-z0-9!@#$%^&*(-_=+)' < /dev/urandom | head -c50

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment