Flask Route Lists
I have a flash app with a tree below:
root/
- modules/
__init__.py
- common/
__init__.py
- citrixlb/
__init__.py # blueprint code
citrixlb.py # module class
- aws/
__init__.py # blueprint code
aws.py # module class
So, I would like to know if there is a way to dynamically list all routes for all blueprints?
I have this in my root/__init__.py
:
# import our modules
from modules.citrixlb import *
from modules.aws import *
app.register_blueprint(aws)
app.register_blueprint(citrix)
If I can dynamically list all routes for all drawings, I can generate links automatically.
Example:
DropDown: AWS
-
/aws
-
/aws/ec2
-
/aws/subnets
+3
source to share
1 answer