Skip to content

Instantly share code, notes, and snippets.

@PraneethKarnena
Last active November 2, 2020 18:13
Show Gist options
  • Save PraneethKarnena/d626eb91ef222d565f0f6a44cbb5cbde to your computer and use it in GitHub Desktop.
Save PraneethKarnena/d626eb91ef222d565f0f6a44cbb5cbde to your computer and use it in GitHub Desktop.
Django production-grade configuration settings
# settings.py - Django 2.2
SECURE_CONTENT_TYPE_NOSNIFF = True
SECURE_BROWSER_XSS_FILTER = True
SECURE_SSL_REDIRECT = True
SESSION_COOKIE_SECURE = True
CSRF_COOKIE_SECURE = True
EMAIL_USE_TLS = True
SERVER_EMAIL = '[email protected]'
ADMINS = [('Admin', '[email protected]')]
DEFAULT_FROM_EMAIL = '[email protected]'
FILE_UPLOAD_DIRECTORY_PERMISSIONS = 0o755
FILE_UPLOAD_PERMISSIONS = 0o644
INTERNAL_IPS = ['127.0.0.1']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment