generate_secret_key.py 313 B

12345678
  1. #!/usr/bin/python
  2. # This script will generate a random 50-character string suitable for use as a SECRET_KEY.
  3. import os
  4. import random
  5. charset = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*(-_=+)'
  6. random.seed = (os.urandom(2048))
  7. print ''.join(random.choice(charset) for c in range(50))