I honestly have no idea why jinja isn't putting any values on my page right now. The syntax seems to be correct, I even referenced it against the staff solution. Can someone point me in the right direction?

enter image description here

This is my implementation of index in my .py file.

def index():
    """Show portfolio of stocks"""
    # List every stock owned
    stocks = db.execute("SELECT ticker FROM trading WHERE buyer = :id", id=session["user_id"])

Here's my index.html


{% for stock in stocks %}
    {{ stock.ticker }}
{% endfor %}


I wasn't putting in the input args to my render_template command. Should have had. return render_template("index.html", stocks=stocks)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .