feat(main): main
This commit is contained in:
@@ -37,6 +37,8 @@ DEBUG = env('DEBUG')
|
||||
|
||||
ALLOWED_HOSTS = ['localhost', '127.0.0.1', '0.0.0.0']
|
||||
CORS_ALLOW_ALL_ORIGINS = True # Allows Vite dev server to connect
|
||||
CORS_ALLOW_CREDENTIALS = True
|
||||
CSRF_TRUSTED_ORIGINS = ['http://localhost:5173', 'http://127.0.0.1:5173']
|
||||
|
||||
# Application definition
|
||||
|
||||
@@ -123,6 +125,11 @@ USE_TZ = True
|
||||
|
||||
AUTH_USER_MODEL = 'core.AppUser'
|
||||
|
||||
# Session lifetime: keep login persistent for a bounded time window.
|
||||
SESSION_COOKIE_AGE = env.int('SESSION_COOKIE_AGE', default=60 * 60 * 24 * 7) # 7 days
|
||||
SESSION_EXPIRE_AT_BROWSER_CLOSE = env.bool('SESSION_EXPIRE_AT_BROWSER_CLOSE', default=False)
|
||||
SESSION_SAVE_EVERY_REQUEST = True
|
||||
|
||||
|
||||
# Static files (CSS, JavaScript, Images)
|
||||
# https://docs.djangoproject.com/en/6.0/howto/static-files/
|
||||
@@ -131,3 +138,7 @@ STATIC_URL = "static/"
|
||||
|
||||
# YouTube video cache directory (used by core.services.youtube and cache_upcoming command)
|
||||
MEDIA_ROOT = env('MEDIA_ROOT', default='/tmp/pytv_cache')
|
||||
|
||||
# Backups are always written to a fixed in-container location.
|
||||
BACKUP_ROOT = env('BACKUP_ROOT', default='/Backups')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user