Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![toirleachomalley](https://secure.gravatar.com/avatar/6fa7530c5b0e08deed6752075476b1d8?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
toirleachomalley
11,979 PointsProblems with Task 2 in this quiz. It is the only outstanding item I have from finishing the Flask basics.
I've tried several attempts at this but without any debugging or being able to see the relevant objects, I cannot complete this. This means I do not complete the course...mega frustrated and sad face!!
my final attempt. I know it is something simple but I'm just very frustrated at this point. Perhaps being able to do a bit of debugging in more challenging quizzes would be an idea??
<ul class="teachers">
{% for teacher in teachers %}
<li><h2>{{ teacher.get('name') }}</h2>
<ul class="courses">
{% for course in teacher.courses() %}
<li>{{ course }}</li>
{% endfor %}
</ul>
</li>
{% endfor %}
</ul>
from flask import Flask, render_template
from teachers import TEACHERS
app = Flask(__name__)
@app.route('/')
def index():
return render_template("teachers.html", teachers=TEACHERS)
<ul class="teachers">
{% for teacher in teachers %}
<li><h2>{{ teacher.get('name') }}</h2>
<ul class="courses">
{% for course in teacher.courses() %}
<li>{{ course }}</li>
{% endfor %}
</ul>
</li>
{% endfor %}
</ul>
1 Answer
![Steven Parker](https://uploads.teamtreehouse.com/production/profile-photos/969492/micro_tool_chess_set_2.jpg)
Steven Parker
230,688 PointsYou're really close!
But courses isn't a method in itself. You could access it using the get method like you did with name, or you could just access it directly.
toirleachomalley
11,979 Pointstoirleachomalley
11,979 Pointswow, i thought I had tried that BUT I had a typo in the code when I did. Schoolboy error of having {$ instead of {% in one of jinja endfor tags. This is what I was trying to get at in relation to the debug or even better error messages coming from the quiz environment. It makes it very difficult to track down silly issues like this.
Thanks for the help. It is always good to get a second pair of eyes in the search.