from .base import *
from .unfold_conf import *
CORS_ALLOW_ALL_ORIGINS = True
# sqlite database
DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.sqlite3',
        'NAME': BASE_DIR / 'db.sqlite3',
    }
} 

MEDIA_URL = '/shop_media/'
MEDIA_ROOT = 'app/media'

STATIC_URL = '/shop_static/'
STATIC_ROOT = 'app/static'

# ==============================================================================
# to avoid gateway post problem
# ==============================================================================

USE_X_FORWARDED_HOST = True
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')


DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.postgresql',
        'NAME': os.getenv("DB_NAME"),
        'USER': os.getenv("DB_USER"),
        'PASSWORD': os.getenv("DB_PASSWORD"),
        'HOST': '45.149.79.107',
        'PORT': 5434,
    }
}
