Python Flask Basics Templates and Static Files Template Inheritance

Bummer! Make sure the `<title>` tag still has its title. "Smells Like Bakin'" should be in the block, too

I am new to Flask, python. This is a Challenge Task 1 of 6 (template iheritance)

I am using this code and I get above error. I am unable to resolve it.

flask_app.py
from flask import Flask
from flask import render_template

app = Flask(__name__)


@app.route('/')
def index():
    return render_template('index.html')
templates/index.html
<!doctype html>
<html>
<head><title>Homepage</title></head>
<body>
<h1>Smells Like Bakin'!</h1>
<p>Welcome to my bakery web site!</p>
</body>
</html>
templates/layout.html
<!doctype html>
<html>
<head> 
  <title>{% block title %} "Smells Like Bakin" {% endblock %} </title>        
</head>
<body>
        {% block content %}     {% endblock %}
</body>
</html>

1 Answer

Chris Freeman
MOD
Chris Freeman
Treehouse Moderator 56,641 Points

This passes for layout.html.

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

It looks like the spaces, added double-quotes, and the removal of the trailing single-quote are missing things up in your solution:

  <title>{% block title %} "Smells Like Bakin" {% endblock %} </title>