when I run app.py and when i go to the browser, the text is not displayed
/Project_file/
├── app.py
└── templates/
├── base.html
└── index.html
/Project_file/
├── app.py
└── templates/
├── base.html
└── index.html
from flask import Flask, render_template app = Flask(__name__) @app.route('/') def index(): return render_template('index.html') if __name__ == "__main__": app.run(debug=True)
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> {% block head %}{% endblock %} </head> <body> {% block body %}{% endblock %} </body> </html>
{% extends 'base.html' %} {% block head %} <title>Main page</title> {% endblock %} {% block body %} <p>Welt!</p> {% endblock %}