update static url settings

This commit is contained in:
2026-06-09 16:00:58 +08:00
parent 2b86c91edd
commit 1dc9141856
2 changed files with 9 additions and 2 deletions
+4
View File
@@ -109,6 +109,10 @@ USE_TZ = True
STATIC_URL = 'static/'
STATICFILES_DIRS = [BASE_DIR / 'static']
# 静态资源公网前缀:本地直连为空;线上 Nginx 把应用挂在 /server 子路径下时设为 '/server'
# (只用于生成对外可访问的静态 URL,不改变 Django 实际提供文件的路径)
STATIC_PUBLIC_PREFIX = os.getenv('STATIC_PUBLIC_PREFIX', '')
# 机构 Banner 默认图(当 Institution.banner_url 为空时回退使用,相对 STATIC_URL)
DEFAULT_INSTITUTION_BANNER = 'institutions/default_hospital.png'