0

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.

@app.route("/")
@login_required
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

<table>


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

0

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 .