Michael
Michael

Reputation: 503

Beginner Flask/Jinja2 - Extends/Block not working

So I'm trying to put a block in my original layout but can't figure out how to make it work.

home.html

<!DOCTYPE html>
<html lang="en">

 <head>
 </head>

 <body>
  {% block content %}
  {% endblock content %}
 </body>

</html>

projects.html

    {% extends 'home.html' %}

    {% block content %}

   <h6> HEY! </h6>

    {% endblock content %}

I've tried to replace the {% endblock content %} in the two files by just {% endblock %}, didn't work.

What am I doing wrong?

Upvotes: 2

Views: 3056

Answers (1)

user15758437
user15758437

Reputation: 11

im looking for a different problem but yours is endblock dont worry about the block name so it would be

{% block content &} and {% endblock %}

Upvotes: 1

Related Questions