Редактор ачивок в админке + файловое хранилище ачивок (задел под титулы)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -45,6 +45,10 @@ class Settings(BaseSettings):
|
||||
dev_upload_dir: str = "./data/dev/uploads"
|
||||
prod_upload_dir: str = "/data/uploads"
|
||||
|
||||
# Каталог ачивок (папка на ачивку: meta.json, condition.py, icon.*), раздельно.
|
||||
dev_achievements_dir: str = "./data/dev/achievements"
|
||||
prod_achievements_dir: str = "/data/achievements"
|
||||
|
||||
# JWT / cookie
|
||||
secret_key: str = "change-me-dev-secret-not-for-production"
|
||||
jwt_algorithm: str = "HS256"
|
||||
@@ -97,6 +101,10 @@ class Settings(BaseSettings):
|
||||
def upload_dir(self) -> str:
|
||||
return self.dev_upload_dir if self.is_development else self.prod_upload_dir
|
||||
|
||||
@property
|
||||
def achievements_dir(self) -> str:
|
||||
return self.dev_achievements_dir if self.is_development else self.prod_achievements_dir
|
||||
|
||||
@property
|
||||
def cookie_secure(self) -> bool:
|
||||
"""Secure-cookie нужен везде, где снаружи HTTPS (домен). Исключение —
|
||||
|
||||
Reference in New Issue
Block a user