# vim: syntax=python
from django.conf import settings

"""
Example of changes suitable for production
"""

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = (
    "django-insecure-1fgtf05rwp0qp05@ef@a7%x#o+t6vk6063py=vhdmut0j!8s4u"
)

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = False

# SECURITY WARNING: cache middlewares must be loaded before cookies one
MIDDLEWARE = [
    "ram.middleware.DisableClientSideCachingMiddleware",
    "django.middleware.cache.UpdateCacheMiddleware",
    "django.middleware.common.CommonMiddleware",
    "django.middleware.cache.FetchFromCacheMiddleware",
] + settings.MIDDLEWARE

CACHES = {
    "default": {
        "BACKEND": "django.core.cache.backends.filebased.FileBasedCache",
        "LOCATION": settings.STORAGE_DIR / "cache",
    }
}

CACHE_MIDDLEWARE_SECONDS = 300
STORAGE_DIR = BASE_DIR / "storage"
ALLOWED_HOSTS = ["127.0.0.1", "myhost"]
CSRF_TRUSTED_ORIGINS = ["https://myhost"]
STATIC_URL = "static/"
MEDIA_URL = "media/"
USE_X_ACCEL_REDIRECT = True
