from .base import * from decouple import ConfigIni import dj_database_url config = ConfigIni( PROJECT_DIR.child('infra_confs') + '/settings-production.ini') ALLOWED_HOSTS = [] ########## MAILTRAP CONFIGURATION EMAIL_HOST = config('EMAIL_HOST') EMAIL_HOST_USER = config('EMAIL_HOST_USER') EMAIL_HOST_PASSWORD = config('EMAIL_HOST_PASSWORD') EMAIL_PORT = config('EMAIL_PORT') EMAIL_USE_TLS = config('EMAIL_USE_TLS') ########## END MAILTRAP CONFIGURATION ########## DATABASE CONFIGURATION DATABASES = {'default': dj_database_url.config(default=config('DATABASE_URL'))} ########## END DATABASE CONFIGURATION INSTALLED_APPS += ('gunicorn', ) ########## AMAZON S3 CONFIGURATION # 1 - Create the variables envoirement # AWS_STORAGE_BUCKET_NAME='test' # 2 - Export the varables # export AWS_STORAGE_BUCKET_NAME
from .base import * from decouple import ConfigIni import dj_database_url config = ConfigIni(PROJECT_DIR.child('infra_confs')+'/settings.ini') DEBUG = True BASE_DIR = PROJECT_DIR PROJECT_ROOT = Path(__file__) EMAIL_HOST = config('EMAIL_HOST') EMAIL_HOST_USER = config('EMAIL_HOST_USER') EMAIL_HOST_PASSWORD = config('EMAIL_HOST_PASSWORD') EMAIL_PORT = config('EMAIL_PORT') EMAIL_USE_TLS = config('EMAIL_USE_TLS') INSTALLED_APPS += ( 'gunicorn', ) DATABASES = { 'default': dj_database_url.config( default=config('DATABASE_URL') ) } DATABASES['default'] = dj_database_url.config(conn_max_age=500) SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARD_PROTO', 'https') ALLOWED_HOSTS = [
import os from base import * from decouple import ConfigIni import dj_database_url # ######### DEBUG CONFIGURATION DEBUG = True TEMPLATE_DEBUG = DEBUG # ######### END DEBUG CONFIGURATION config = ConfigIni(PROJECT_DIR.child('confs') + '/settings-staging.ini') # ######### INSTALLED APPS CONFIGURATION INSTALLED_APPS += ( 'django_nose', 'nose', 'gunicorn', 'djrill', ) # ######### TEST SETTINGS TEST_RUNNER = "django_nose.NoseTestSuiteRunner" TEST_DISCOVER_TOP_LEVEL = PROJECT_DIR TEST_DISCOVER_ROOT = PROJECT_DIR TEST_DISCOVER_PATTERN = "test_*" NOSE_ARGS = ['--verbosity=2', '-x', '-d'] os.environ['REUSE_DB'] = "1" # ######### END TEST SETTINGS