Skip to content

Instantly share code, notes, and snippets.

@seguri
Created October 16, 2013 13:38
Show Gist options
  • Save seguri/7007848 to your computer and use it in GitHub Desktop.
Save seguri/7007848 to your computer and use it in GitHub Desktop.
Django secret key generator
from os.path import join
from random import SystemRandom
valid_chars = list('abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*(-_=+)')
print(''.join(SystemRandom().sample(valid_chars, 50)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment