Skip to content

Instantly share code, notes, and snippets.

@joke2k
Created June 5, 2018 11:12
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save joke2k/cc30ed2d5ccda52d5b551ccbc17e536b to your computer and use it in GitHub Desktop.
standard django settings VS django-environ
import os
DEBUG = True
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'database',
'USER': 'user',
'PASSWORD': 'githubbedpassword',
'HOST': '127.0.0.1',
'PORT': '8458',
},
'extra': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(SITE_ROOT, 'database.sqlite')
}
}
SECRET_KEY = '...im incredibly still here...'
CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
'LOCATION': [
'127.0.0.1:11211'
]
},
'redis': {
'BACKEND': 'django_redis.cache.RedisCache',
'LOCATION': '127.0.0.1:6379/1',
'OPTIONS': {
'CLIENT_CLASS': 'django_redis.client.DefaultClient',
'PASSWORD': 'redis-githubbed-password',
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment