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

Eduardo Diaz
PLUS
Eduardo Diaz
Courses Plus Student 6,048 Points

whats the proper way tp inherit the header ?

i dont understand how to properly inherit this header from layout ?? I tired putting the block inside the title only but it also didnt work

code_challenges/templates/code_challenges/layout.html
<html>
  {% block header %}
    <head>
        <title> Code Challenge</title>
    </head>
   {% endblock %}
    <body>
        <div class="page-header">
            {% block content %} 
            {% endblock %}

        </div> 
    </body>
</html>
code_challenges/templates/code_challenges/list.html
{% extends 'code_challenges/layout.html' %}

{% block header %} <title> Welcome to the code challenges! </title> {% endblock %}