Remove site_config file & add templates_local

This commit is contained in:
Nyymix 2025-05-03 00:11:05 +03:00
parent 8c11e02d9c
commit e37c412fd9
9 changed files with 24 additions and 76 deletions

View file

@ -43,6 +43,10 @@ TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [BASE_DIR / "templates"],
'DIRS': [
BASE_DIR / "templates_local",
BASE_DIR / "templates",
],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
@ -50,7 +54,6 @@ TEMPLATES = [
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
'gallery.context_processors.site_config',
],
},
},
@ -98,9 +101,8 @@ TIME_ZONE = 'UTC'
USE_I18N = True
#USE_TZ = True
USE_TZ = False
# USE_L10N = True
# USE_TZ = False
# Static files (CSS, JavaScript, Images)
@ -130,20 +132,21 @@ DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
# Sessions
SESSION_COOKIE_AGE = 60 * 60 * 24 * 365 * 5 # 5 vuotta
SESSION_EXPIRE_AT_BROWSER_CLOSE = False
SESSION_COOKIE_SECURE = True
SESSION_COOKIE_SAMESITE = 'Lax'
SESSION_CACHE_ALIAS = "default"
# Sessio backend: cache + fallback tietokantaan
SESSION_ENGINE = 'django.contrib.sessions.backends.cached_db'
# Redis cache
# Redis cache
CACHES = {
"default": {
"BACKEND": "django_redis.cache.RedisCache",
"LOCATION": "redis://127.0.0.1:6379/1",
"OPTIONS": {
"CLIENT_CLASS": "django_redis.client.DefaultClient",
}
},
'KEY_PREFIX': 'session',
}
}
@ -198,4 +201,4 @@ LOGGING = {
try:
from .local_settings import *
except ImportError:
pass
pass