Skip to content

Instantly share code, notes, and snippets.

@adrianomargarin
Last active April 18, 2018 17:00
Show Gist options
  • Save adrianomargarin/40b97f4a0ab447273e9d29128e024067 to your computer and use it in GitHub Desktop.
Save adrianomargarin/40b97f4a0ab447273e9d29128e024067 to your computer and use it in GitHub Desktop.
contrib
DEBUG=True
SECRET_KEY=THIS_IS_NOT_A_GOOD_SECRET
ALLOWED_HOSTS=127.0.0.1, .localhost, .herokuapp.com
#!/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