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 trialChristopher Shaw
Python Web Development Techdegree Graduate 58,248 PointsSimple extends keeps failing
The question is only in list.html to extend layout.html. I don't know why it keeps failing. I have tried both and neither are working:
{% extends "layout.html" %}
or
{% extends "code_challenges/layout.html" %}
<html>
<head>
<title>{% block title %}{% endblock %}</title>
</head>
<body>
<div class="page-header">
<!-- YOUR CODE HERE -->
</div>
</body>
</html>
{% extends "code_challenges/layout.html" %}
3 Answers
Simon Coates
28,694 Pointsdunno. I took at look at an earlier post, which i think is the same question. They seemed to have success with a set of code that looks like yours.
Christopher Shaw
Python Web Development Techdegree Graduate 58,248 PointsThank you Simon, When I copied and pasted Chris Freeman answer, Task two then passed, but as soon as I checked Task 3 (code below), it says that Task 2 is no longer passing.
{% extends "code_challenges/layout.html" %}
{% block title %}Welcome to the code challenges!{% endblock %}
Christopher Shaw
Python Web Development Techdegree Graduate 58,248 PointsAnd I forgot to mention, also to get task 2 to pass, I have to include the original title as default text.
<title>{% block title %}Code Challenge{% endblock %}</title>
Simon Coates
28,694 Points<html>
<head>
<title>Code Challenge</title>
</head>
<body>
<div class="page-header">
{% block header %}{% endblock %}
</div>
</body>
</html>
{% extends "code_challenges/layout.html" %}
{% block header %}Welcome to the code challenges!{% endblock %}
I wasn't sure where you got up to, but the following works. Some of the error messages i got seemed to be wrong. It keps telling me it couldn't find layout.
Christopher Shaw
Python Web Development Techdegree Graduate 58,248 PointsThanks Simon, That worked. I am still not sure why mine did not.
Simon Coates
28,694 PointsI think treehouse's messages and testing for this challenge may be messed up. The message about layout being missing disappeared after i changed my code for task1. It doesn't make any sense to me.