Python Flask Basics Templates and Static Files Template Inheritance

adi pat
adi pat
445 Points

getting error

not able to recognise the title block

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
{% extends "layout.html" %}
{% block title %}
  Homepage
{% endblock %}
{% block content %}
  <h1>Smells Like Bakin'!</h1>
  <p>Welcome to my bakery web site!</p>
{% endblock %}
templates/layout.html
<!doctype html>
<html>
<head>
  <title>{% block title %}Smells Like Bakin{% endblock %}</title>
  </head>
<body>
  {% block content %}{% endblock %}
</body>
</html>

1 Answer

Ave Nurme
Ave Nurme
11,755 Points

Hi Adi

There are six tasks in this challenge. Can you please specify which task are you stuck on?