forked from MinhQuan/MiscCorpo
Refactor static serving: use Blueprint static_folder, inline header
- Disable Flask default /static/ folder (static_folder=None in app.py) - Add headerRoute blueprint to serve views/header/ at /assets/header/ - Configure transcription and scraper blueprints with static_folder pointing to their respective views/ subfolders - Inline header HTML directly in headerLoader.js (remove fetch call) - Update all HTML templates to use new /assets/... URLs
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
# routes/headerRoute.py
|
||||
from flask import Blueprint
|
||||
|
||||
# Blueprint để serve headerLoader.js từ views/header/
|
||||
# → URL: /assets/header/headerLoader.js
|
||||
header_bp = Blueprint(
|
||||
'header',
|
||||
__name__,
|
||||
static_folder='../views/header',
|
||||
static_url_path='/assets/header',
|
||||
)
|
||||
Reference in New Issue
Block a user