fix: 修复统计日历 bootstrap 导致整站 500

日历数据改为安全 JSON 内嵌,仅统计页构建;构建失败时降级为空,避免拖垮其他页面。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-06-30 09:24:54 +08:00
parent 3b687d17eb
commit 32079bb4c2
12 changed files with 91 additions and 35 deletions
+2 -2
View File
@@ -452,8 +452,8 @@
</select>
</label>
</div>
{% if stats_bundle.initial_calendar %}
<script type="application/json" id="stats-calendar-bootstrap">{{ stats_bundle.initial_calendar | tojson }}</script>
{% if stats_bundle.calendar_bootstrap_json %}
<script type="application/json" id="stats-calendar-bootstrap">{{ stats_bundle.calendar_bootstrap_json | safe }}</script>
{% endif %}
<div id="stats-calendar-wrap" class="trade-cal-wrap stats-calendar-wrap">
<div class="trade-cal-head">