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 Customizing Django Templates Template Tags and Filters Blocks and Inheritance

V K
V K
5,237 Points

{% extends "code_challenges/layout.html" %} does not complete task 2

I have tried various ways to complete task 2. I looked at the forums for answers after failing to get my solution to work. I'm a bit confused as to why this seemingly simple task is creating such difficulties.

code_challenges/templates/code_challenges/layout.html
<html>
    <head>
        <title>Code Challenge</title>
    </head>
    <body>
        <div class="page-header">
            {% block content % }<!-- YOUR CODE HERE -->
            {% endblock %}
        </div> 
    </body>
</html>
code_challenges/templates/code_challenges/list.html
{% extends "code_challenges/layout.html" %}
{% block title %}Welcome to the code challenges!{% endblock %}

1 Answer

Alx Ki
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Alx Ki
Python Web Development Techdegree Graduate 14,822 Points

You created {%block content%} in layout.html, but trying to fill it with {%block title%}. That's it! ;)

Name the block same in both files.

V K
V K
5,237 Points

Thank you! Like so many of my errors..completely careless on my part.