首页 > 解决方案 > Flask 如何从 API 流创建依赖下拉列表

问题描述

我想创建两个相关的下拉列表,第一个具有静态内容,例如 Stake_Currency

stake_symbol = ('USDT','BNB','ETH','BTC') # content of the first drop down list where I can choose  

第二个下拉列表应该从 API Stream 动态创建:

for  symbol in trade_symbol:
    if stake_symbol in symbol:
    print (symbol)
#here I will get all symbols , so if I choose USDT I will get all USDT pairs , and son on 

我发现的大多数答案都涉及使用数据库和 ajax,

标签: pythonlistflaskdropdown

解决方案


推荐阅读