Remove site_config file & add templates_local
This commit is contained in:
parent
8c11e02d9c
commit
e37c412fd9
9 changed files with 24 additions and 76 deletions
|
@ -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
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
{
|
||||
"site_head_title": "Gallery",
|
||||
"site_head_description": "Muistox Photo Gallery",
|
||||
|
||||
"title": "Gallery",
|
||||
"description": "Just another wannabe photographer...",
|
||||
|
||||
"footer_copyright": "Powered by <a href='https://git.hakkeri.net/nyymix/muistox'>muistox</a>.",
|
||||
|
||||
"about_title": "Muistox gallery",
|
||||
"about_description": "Just another wannabe photographer...",
|
||||
"about_profile_image": "img/default.png",
|
||||
|
||||
"contact_email": "muistox@gallery.invalid",
|
||||
"bluesky_url": "https://bsky.app/",
|
||||
"twitter_url": "https://twitter.com/",
|
||||
"instagram_url": "https://www.instagram.com/"
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue