Skip to content

Instantly share code, notes, and snippets.

@alexryabtsev
Created April 4, 2019 21:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexryabtsev/897a963ec458b2f2bdfc7d79e6b9b43f to your computer and use it in GitHub Desktop.
Save alexryabtsev/897a963ec458b2f2bdfc7d79e6b9b43f to your computer and use it in GitHub Desktop.
import os
SITE_ROOT = os.path.dirname(os.path.dirname(os.path.dirname(os.path.realpath(__file__))))
DEBUG = True
TEMPLATE_DEBUG = DEBUG
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': 'production_db',
'USER': 'user',
'PASSWORD': 'password',
'HOST': 'db.example.com',
'PORT': '5432',
'OPTIONS': {
'sslmode': 'require'
}
}
}
MEDIA_ROOT = os.path.join(SITE_ROOT, 'assets')
MEDIA_URL = 'media/'
STATIC_ROOT = os.path.join(SITE_ROOT, 'static')
STATIC_URL = 'static/'
SECRET_KEY = 'Some-Autogenerated-Secret-Key'
CACHES = {
'default': {
'BACKEND': 'django_redis.cache.RedisCache',
'LOCATION': '127.0.0.1:6379/1',
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment