Mengembangkan SelectField dari file JSON
@app.route("/create", methods=['GET', 'POST'])
def create():
form = CreateDelivery()
with open("..\manufacturers.json", "r") as file:
manu = json.load(file)
form.manufacturer.choices = [(i['data'], i['name']) for i in manu['manufacturers']]
Easy Elephant