Created
February 2, 2018 01:08
-
-
Save ridoansaleh/be691b8f35b0cab88ee55b01408c68b2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from .base import * | |
import dj_database_url | |
# SECURITY WARNING: don't run with debug turned on in production! | |
DEBUG = False | |
MIDDLEWARE_CLASSES = ( | |
'whitenoise.middleware.WhiteNoiseMiddleware', | |
'django.contrib.sessions.middleware.SessionMiddleware', | |
'django.middleware.common.CommonMiddleware', | |
'django.middleware.csrf.CsrfViewMiddleware', | |
'django.contrib.auth.middleware.AuthenticationMiddleware', | |
'django.contrib.auth.middleware.SessionAuthenticationMiddleware', | |
'django.contrib.messages.middleware.MessageMiddleware', | |
'django.middleware.clickjacking.XFrameOptionsMiddleware', | |
'django.middleware.security.SecurityMiddleware', | |
) | |
# Database | |
# https://docs.djangoproject.com/en/1.8/ref/settings/#databases | |
DATABASES = { | |
'default': { | |
'ENGINE': 'django.db.backends.postgresql_psycopg2', | |
'NAME': 'music', | |
'USER': 'ridoansaleh', | |
'PASSWORD': 'ridoansaleh', | |
'HOST': 'localhost', | |
'PORT': '', | |
} | |
} | |
db_from_env = dj_database_url.config(conn_max_age=500) | |
DATABASES['default'].update(db_from_env) | |
# Static files (CSS, JavaScript, Images) | |
# https://docs.djangoproject.com/en/1.8/howto/static-files/ | |
STATIC_ROOT = os.path.join(BASE_DIR, '../staticfiles') | |
STATIC_URL = '/static/' | |
# Extra places for collectstatic to find static files. | |
STATICFILES_DIRS = ( | |
os.path.join(BASE_DIR, '../jual/static'), | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment