Commit 06fb4093 authored by Carolina's avatar Carolina

Eimina local_settings del repo

parent 6eedbc68
Pipeline #7309 passed with stages
in 10 minutes and 51 seconds
# -*- coding: utf-8 -*-
import os
DEBUG = eval(os.getenv('DEBUG', 'True'))
# Database
# https://docs.djangoproject.com/en/1.11/ref/settings/#databases
LOCAL_DATABASES = {
'default': {
# engines: 'postgresql', 'mysql', 'sqlite3' or 'oracle'
'ENGINE': 'django.db.backends.postgresql',
'NAME': 'misuper',
'USER': '',
'PASSWORD': '',
'HOST': '',
'PORT': '',
}
}
LOCALLY_INSTALLED_APPS = [
]
ENABLE_EMAILS = eval(os.getenv('ENABLE_EMAILS', 'True'))
EMAIL_HOST = os.getenv('EMAIL_HOST')
EMAIL_HOST_USER = os.getenv('EMAIL_HOST_USER')
EMAIL_HOST_PASSWORD = os.getenv('EMAIL_HOST_PASSWORD')
EMAIL_PORT= os.getenv('EMAIL_PORT')
EMAIL_USE_TLS = eval(os.getenv('EMAIL_USE_TLS', 'True'))
LOCALLY_ALLOWED_HOSTS = os.getenv('ALLOWED_HOSTS', 'localhost').split(',')
ADMINS = eval(os.getenv('ADMINS')) if os.getenv('ADMINS') else ()
GOOGLE_ANALYTICS_CODE = os.getenv('GOOGLE_ANALYTICS_CODE')
GOOGLE_MAPS_TOKEN= os.getenv('GOOGLE_MAPS_TOKEN')
SECRET_KEY = 'i8ge$7ct(3)f^phii5qj6=o%wlo#lgl(3qx697qlxk=rwgr!i9'
RECAPTCHA_PUBLIC_KEY = os.getenv('RECAPTCHA_PUBLIC_KEY')
RECAPTCHA_PRIVATE_KEY = os.getenv('RECAPTCHA_PRIVATE_KEY')
USE_S3 = eval(os.getenv('USE_S3', 'False'))
AWS_ACCESS_KEY_ID = os.getenv('AWS_ACCESS_KEY_ID')
AWS_SECRET_ACCESS_KEY = os.getenv('AWS_SECRET_ACCESS_KEY')
AWS_STORAGE_BUCKET_NAME = os.getenv('AWS_STORAGE_BUCKET_NAME')
AWS_S3_REGION_NAME = os.getenv('AWS_S3_REGION_NAME')
AWS_DEFAULT_ACL = None
COMPRESS_OFFLINE = eval(os.getenv('COMPRESS_OFFLINE', 'True'))
COMPRESS_ENABLED = eval(os.getenv('COMPRESS_ENABLED', 'True'))
ROLLBAR_ACCESS_TOKEN = os.getenv('ROLLBAR_ACCESS_TOKEN', '')
CHILE_ATIENDE_ACCESS_TOKEN = os.getenv('CHILE_ATIENDE_ACCESS_TOKEN', None)
# CLAVE UNICA
CLAVE_UNICA_CALLBACK = os.getenv('CLAVE_UNICA_CALLBACK', '')
CLAVE_UNICA_CLIENT_ID = os.getenv('CLAVE_UNICA_CLIENT_ID', '')
CLAVE_UNICA_SECRET_KEY = os.getenv('CLAVE_UNICA_SECRET_KEY', '')
URL_PREFIX = os.getenv('URL_PREFIX', None)
DEFAULT_FROM_EMAIL = os.getenv('DEFAULT_FROM_EMAIL', 'webmaster@localhost')
DGD_EMAIL_URL_SEND_EMAIL = os.getenv('DGD_EMAIL_URL_SEND_EMAIL', '')
DGD_EMAIL_ACCESS_URL = os.getenv('DGD_EMAIL_ACCESS_URL', '')
DGD_EMAIL_CLIENT_ID = os.getenv('DGD_EMAIL_CLIENT_ID', '')
DGD_EMAIL_CLIENT_SECRET = os.getenv('DGD_EMAIL_CLIENT_SECRET', '')
DGD_EMAIL_TOKEN_APP = os.getenv('DGD_EMAIL_TOKEN_APP', '')
SUPER_PAGES_URL = os.getenv(
'SUPER_PAGES_URL',
'https://super.gob.cl/fichas/'
)
......@@ -33,6 +33,7 @@ LOCALLY_ALLOWED_HOSTS = os.getenv('ALLOWED_HOSTS', 'localhost').split(',')
ADMINS = eval(os.getenv('ADMINS')) if os.getenv('ADMINS') else ()
GOOGLE_ANALYTICS_CODE = os.getenv('GOOGLE_ANALYTICS_CODE')
GOOGLE_MAPS_TOKEN= os.getenv('GOOGLE_MAPS_TOKEN')
SECRET_KEY = os.getenv('SECRET_KEY', 'CHANGE ME')
......
......@@ -22,16 +22,11 @@ from django.utils.translation import ugettext_lazy as _
# local settings
if 'CIRCLECI' in os.environ:
local_settings = import_module('project.circleci_settings')
print("CIRCLECI")
elif 'CI' in os.environ:
print("CI")
local_settings = import_module('project.gitlabci_settings')
else:
print("LOCAL")
local_settings = import_module('project.local_settings')
print(local_settings)
DEBUG = local_settings.DEBUG
LOCAL_DATABASES = local_settings.LOCAL_DATABASES
LOCALLY_INSTALLED_APPS = local_settings.LOCALLY_INSTALLED_APPS
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment