16 lines
376 B
Python
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()
|