Skip to content

Instantly share code, notes, and snippets.

@diegosorrilha
Forked from henriquebastos/secret_gen.py
Created January 3, 2016 21:09
Show Gist options
  • Save diegosorrilha/ad6dc1561039a7151cf5 to your computer and use it in GitHub Desktop.
Save diegosorrilha/ad6dc1561039a7151cf5 to your computer and use it in GitHub Desktop.
SECRET_KEY generator.
#!/usr/bin/env python
"""
Django SECRET_KEY generator.
"""
from django.utils.crypto import get_random_string
chars = 'abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*(-_=+)'
print(get_random_string(50, chars))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment