Kamixitong/check_routes.py
2025-11-11 21:39:12 +08:00

16 lines
376 B
Python

#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from app import create_app
def check_routes():
"""检查路由注册情况"""
app = create_app()
with app.app_context():
print("=== 路由注册情况 ===")
for rule in app.url_map.iter_rules():
print(f"{rule.rule} -> {rule.endpoint}")
if __name__ == "__main__":
check_routes()