Browse Source

Ajusta o uso do python-decouple

pull/253/head
Eduardo Calil 9 years ago
committed by Edward Ribeiro
parent
commit
70be77dcdc
  1. 2
      requirements/requirements.txt
  2. 14
      sapl/settings.py

2
requirements/requirements.txt

@ -1,4 +1,4 @@
dj-database-url
django-admin-bootstrapped==2.5.7 django-admin-bootstrapped==2.5.7
django-bootstrap3==7.0.0 django-bootstrap3==7.0.0
django-bower==5.1.0 django-bower==5.1.0

14
sapl/settings.py

@ -16,6 +16,8 @@ from .temp_suppress_crispy_form_warnings import \
from decouple import config from decouple import config
from dj_database_url import parse as db_url
BASE_DIR = Path(__file__).ancestor(2) BASE_DIR = Path(__file__).ancestor(2)
@ -108,14 +110,10 @@ WSGI_APPLICATION = 'sapl.wsgi.application'
# https://docs.djangoproject.com/en/1.8/ref/settings/#databases # https://docs.djangoproject.com/en/1.8/ref/settings/#databases
DATABASES = { DATABASES = {
'default': { 'default': config(
'ENGINE': 'django.db.backends.postgresql_psycopg2', 'DATABASE_URL',
'NAME': config('NAME'), cast=db_url,
'USER': config('SET_USER'), )
'PASSWORD': config('PASSWORD'),
'HOST': config('HOST'),
'PORT': config('PORT'),
}
} }
EMAIL_USE_TLS = config('EMAIL_USE_TLS', cast=bool) EMAIL_USE_TLS = config('EMAIL_USE_TLS', cast=bool)

Loading…
Cancel
Save