from .settings import *
DEBUG = False
STATIC_ROOT = BASE_DIR / "staticfiles"
CSRF_TRUSTED_ORIGINS = ["http://localhost:1337","http://0.0.0.0:1337"]

STATICFILES_DIRS = [
    BASE_DIR / "app/static",
]

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.postgresql',
        'NAME': 'clipper_db',
        'USER': 'clipper',
        'PASSWORD': 'clipper',
        'HOST': 'db',
        'PORT': '5432',
    }
}

MEDIA_ROOT = BASE_DIR / 'mediafiles'

#
LOGGING = {
    'version': 1,
    'disable_existing_loggers': False,
    'handlers': {
        'console': {
            'level': 'DEBUG',
            'class': 'logging.StreamHandler',
        },
    },
    'loggers': {
        'django': {
            'handlers': ['console'],
            'level': 'INFO',
            'propagate': True,
        },
        'django.request': {
            'handlers': ['console'],
            'level': 'ERROR',  # Log errors about requests
            'propagate': False,
        },
    }
}