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

Python Django Basics Django Templates Override a block

Calum Devitt
Calum Devitt
3,763 Points

Now put the existing contents of article_list.html, the {% for %} loop, into the block "content".

no idea what is asking me to do

articles/templates/articles/article_list.html
{% extends "base.html" %}


{% for article in articles %}
{% block content %} 
{{ article.headline }}

1 Answer

Chris Freeman
MOD
Chris Freeman
Treehouse Moderator 68,457 Points

What the challenge is asking you to wrap the existing for loop with a block tag that is named "content". This means adding the start block tag before the {% for .... %} and adding an endblock tag after the {% endfor %}.

The start block tag would be {% block content %} and the end block tag would be {% endblock %}