Jinja2 correctly indent included block
问题 I have two files: base.html <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>{{title}}</title> </head> <body> {% block content %} {% endblock %} </body> </html> register.html {% extends "base.html" %} {% block content %} <h1>Register</h1> <form action="" method="post" name="register"> {{ form.hidden_tag() }} {{ form.login.label }} {{ form.login(size=20) }} {{ form.password.label }} {{ form.password(size=20) }} <input type="submit" value="Register"> </form> {% endblock %} It gets