Skip to content
Advertisement

So my Jinga code is not outputing an option

This is a cs50 pset if you didn’t know.

JavaScript

Here is the app.py

JavaScript

You can consider that stocks is an array and its not empty

The Output is just the first placeholder option and nothing more

Advertisement

Answer

When you call render_template(), you can pass Python variables to it which makes them available in your Jinja template.

Change return render_template("sell.html") to return render_template("sell.html", symbols=symbols)

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement