Arreglo de settings.py
parent
c11327f7a6
commit
d54033b5f5
|
@ -12,6 +12,7 @@ https://docs.djangoproject.com/en/3.2/ref/settings/
|
|||
|
||||
import os
|
||||
from pathlib import Path
|
||||
from decouple import config
|
||||
|
||||
# Build paths inside the project like this: BASE_DIR / 'subdir'.
|
||||
BASE_DIR = Path(__file__).resolve().parent.parent
|
||||
|
@ -27,7 +28,7 @@ SECRET_KEY = 'django-insecure-^ictxnc0j1-^uxvu6233k5sz21!hcyd0=md4$rj^dn9r1eh$@&
|
|||
DEBUG = True
|
||||
SITE_ID = 1
|
||||
|
||||
ALLOWED_HOSTS = []
|
||||
ALLOWED_HOSTS = ['*']
|
||||
|
||||
|
||||
# Application definition
|
||||
|
@ -103,8 +104,15 @@ WSGI_APPLICATION = 'myproject.wsgi.application'
|
|||
|
||||
DATABASES = {
|
||||
'default': {
|
||||
'ENGINE': 'django.db.backends.sqlite3',
|
||||
'NAME': BASE_DIR / 'db.sqlite3',
|
||||
'ENGINE': 'django.db.backends.postgresql',
|
||||
'HOST': config('DBHOST', 'localhost'),
|
||||
'PORT': config('DBPORT', 5432),
|
||||
'USER': config('DBUSER','postgres'),
|
||||
'PASSWORD': config('DBPASS','password'),
|
||||
'NAME': config('DBNAME','database'),
|
||||
'OPTIONS': {
|
||||
'options': '-c search_path=' + config('DBSCHEMA', 'public')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue