Python Flask Basics Character Builder Looping Through Items

Stephen McClure
Stephen McClure
14,436 Points

templates/options.html

I have been pulling my hair out for twenty minutes trying to solve this. I can't look at the options file to see what data I should be accessing, and the question is so vague I can't figure out what I am missing. According to this question I should be able to imbed a for loop as "for item in options" and then do <li>item to complete this challenge. But if I do that I get a parse error on line 19 which neither page of this challenge has 19 lines of code, and if I change the "options" in the for loop to "options[]" then it says its not printing enough lines of <li>, 0 lines found.

app.py
from flask import Flask, render_template

from options import OPTIONS

app = Flask(__name__)


@app.route('/')
def index():
    return render_template('options.html', options=OPTIONS)
templates/options.html
<ul>
  {% for name in options %}
    <li>{{ name }}
  {% endfor %}
</ul>
Anthony Reinosa
Anthony Reinosa
4,499 Points

Hello, Here is a hint. Whenever you open something you have to close it, for example You opened <ul> and you closed it</ul>. Hope this helps.

Stephen McClure
Stephen McClure
14,436 Points

Thanks yeah I finally figured that out, but I was also missing something else too so it kept failing on me.