添加教程的API

This commit is contained in:
2025-06-14 16:48:26 +08:00
parent 92adfd5415
commit 258e1474ee
11 changed files with 86 additions and 11 deletions

View File

@@ -52,7 +52,8 @@ LOCAL_APPS = [
'options',
'judge',
'message',
'comment'
'comment',
'tutorial',
]
INSTALLED_APPS = VENDOR_APPS + LOCAL_APPS
@@ -209,10 +210,10 @@ def redis_config(db):
"KEY_FUNCTION": make_key
}
CACHES = {
"default": redis_config(db=1)
}
if production_env:
CACHES = {
"default": redis_config(db=1)
}
SESSION_ENGINE = "django.contrib.sessions.backends.cache"
SESSION_CACHE_ALIAS = "default"