Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Python

(Flask) Can you please help???

I just cannot figure out what to put in here! Please help... This is the code (look for the "What to put here" comment):

templates/index.html
{% extends "layout.html" %}
<!doctype html>
<html>
<head>
  <!-- What to put here... -->
  {% block title %} ?WHAT DO I PUT HERE? {% endblock %}
</head>

{% block content %}
  <h1>Smells Like Bakin'!</h1>
  <p>Welcome to my bakery web site!</p>
{% endblock %}
</html>
templates/layout.html
{% block title %}Smells Like Bakin'{% endblock %}

{% block content %}

{% endblock %}

1 Answer

Vittorio Somaschini
Vittorio Somaschini
33,371 Points

Hello Xela.

Sorry I have removed my previous answer as I did not quiet understand the question.

Are you stuck at task 4/6? In between the title block tags you don't have to touch the default code, you should leave the word Homepage as it was by default.

But I notice a problem with your layout.hml file. You have removed all the html code from there and you do not want to do it. The layout.html template file has to be filled in with the html provided (same code as the default in task 1/6 plus the title and body tags that you will have to add.

It will end up looking like this:

<!doctype html>
<html>
<head><title>{% block title %}Smells Like Bakin'{% endblock %}</title></head>
<body>
{% block content %}{% endblock %}
</body>
</html>

Vitto

Yes I am stuck at 4/6. Thank you very much it helps!!!