Python Flask Basics Templates and Static Files Template Inheritance

Jothum Chitewe
Jothum Chitewe
7,830 Points


put the contents of the <title>
from flask import Flask
from flask import render_template

app = Flask(__name__)

def index():
    return render_template('index.html')
{% extends "layout.html"%}

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